SpringSource/spring-security-oauth — pull request #38 by aanganes (2012-06-01 21:45:39+00:00)
Title: Split auth request parameters

Per a discussion that Justin and I had with Dave Syer, this patch refactors AuthorizationRequest to have two parameter maps instead of one: authorizationParameters and userConsentParameters. authorizationParameters replaces the original parameters map, and I have updated the references to this map throughout the codebase so that everything compiles, builds, and runs as before.

The userConsentParameters map is passed in to the AuthorizationEndpoint's "approveOrDeny" method, and I have made adjustments to the rest of the token flow code so that these additional parameters are preserved throughout and available to the TokenServices and TokenGranter implementations.

For testing, we moved to a single user consent form in our approve.jsp in order to present additional options (checkboxes) to the user and post them back to the AuthorizationEndpoint. Our form is pasted below for reference. I did not modify the Sparklr sample application, but the dual form used there and in other sample applications should still work.

If this pull request is accepted, you may want to consider adding some documentation showing how to capture additional parameters from the user consent page using a form similar to ours.

Check me out

Check me out