jaredhanson/oauth2orize — pull request #105 by siacomuzzi (2014-12-11 15:50:07+00:00)
Title: grant: support response_mode as optional parameter

The Response Mode determines how the Authorization Server returns result parameters from the Authorization Endpoint. Non-default modes are specified using the `response_mode` request parameter.

If `response_mode` is not present in a request, the default Response Mode mechanism specified by the Response Type is used:
* The default Response Mode for the OAuth 2.0 `code` Response Type is the `query` encoding.
* The default Response Mode for the OAuth 2.0 `token` Response Type is the `fragment` encoding.

### Supported values
#### query
In this mode, Authorization Response parameters are encoded in the query string added to the redirect_uri when redirecting back to the Client.
#### fragment
In this mode, Authorization Response parameters are encoded in the fragment added to the redirect_uri when redirecting back to the Client.
#### form_post
In this mode, Authorization Response parameters are encoded as HTML form values that are auto-submitted in the User Agent, and thus are transmitted via the HTTP POST method to the Client, with the result parameters being encoded in the response body using the application/x-www-form-urlencoded format.

More details:
* http://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#ResponseModes
* http://openid.net/specs/oauth-v2-form-post-response-mode-1_0-01.html#FormPostResponseMode