import { ResponseType } from "https://deno.land/x/authlete_deno@v1.2.9/mod.ts";
From RFC 6749 (OAuth 2.0), 3.1.1. Response Type
response_type
REQUIRED. The value MUST be one of
"code"
for requesting an authorization code as described by Section 4.1.1,"token"
for requesting an access token (implicit grant) as described by Section 4.2.1, or a registered extension value as described by Section 8.4.
From OAuth 2.0 Multiple Response Type Encoding Practices, 3. ID Token Response Type
id_token
When supplied as the
response_type
parameter in an OAuth 2.0 Authorization Request, a successful response MUST include the parameterid_token
. The Authorization Server SHOULD NOT return an OAuth 2.0 Authorization Code, Access Token, or Access Token Type in a successful response to the grant request. If aredirect_uri
is supplied, the User Agent SHOULD be redirected there after granting or denying access. The request MAY include astate
parameter, and if so, the Authorization Server MUST echo its value as a response parameter when issuing either a successful response or an error response. The default Response Mode for this Response Type is the fragment encoding and the query encoding MUST NOT be used. Both successful and error responses SHOULD be returned using the supplied Response Mode, or if none is supplied, using the default Response Mode.
From OAuth 2.0 Multiple Response Type Encoding Practices, 4. None Response Type
none
When supplied as the
response_type
parameter in an OAuth 2.0 Authorization Request, the Authorization Server SHOULD NOT return an OAuth 2.0 Authorization Code, Access Token, Access Token Type, or ID Token in a successful response to the grant request. If aredirect_uri
is supplied, the User Agent SHOULD be redirected there after granting or denying access. The request MAY include astate
parameter, and if so, the Authorization Server MUST echo its value as a response parameter when issuing either a successful response or an error response. The default Response Mode for this Response Type is the query encoding. Both successful and error responses SHOULD be returned using the supplied Response Mode, or if none is supplied, using the default Response Mode.
From OAuth 2.0 Multiple Response Type Encoding Practices, 5. Definitions of Multiple-Valued Response Type Combinations
code token
When supplied as the value for the
response_type
parameter, a successful response MUST include an Access Token, an Access Token Type, and an Authorization Code. The default Response Mode for this Response Type is the fragment encoding and the query encoding MUST NOT be used. Both successful and error responses SHOULD be returned using the supplied Response Mode, or if none is supplied, using the default Response Mode.
code id_token
When supplied as the value for the
response_type
parameter, a successful response MUST include both an Authorization Code and anid_token
. The default Response Mode for this Response Type is the fragment encoding and the query encoding MUST NOT be used. Both successful and error responses SHOULD be returned using the supplied Response Mode, or if none is supplied, using the default Response Mode.
id_token token
When supplied as the value for the
response_type
parameter, a successful response MUST include an Access Token, an Access Token Type, and anid_token
. The default Response Mode for this Response Type is the fragment encoding and the query encoding MUST NOT be used. Both successful and error responses SHOULD be returned using the supplied Response Mode, or if none is supplied, using the default Response Mode.
code id_token token
When supplied as the value for the
response_type
parameter, a successful response MUST include an Authorization Code, anid_token
, an Access Token, and an Access Token Type. The default Response Mode for this Response Type is the fragment encoding and the query encoding MUST NOT be used. Both successful and error responses SHOULD be returned using the supplied Response Mode, or if none is supplied, using the default Response Mode.
Static Properties
code
(1), a response_type
to request an authorization code.
code id_token
(5), a response_type
to request an authorization
code and an ID token.
code id_token token
(7), a response_type
to request an
authorization code, an ID token and an access token.
code token
(4), a response_type
to request an authorization
code and an access token.
id_token
(3), a response_type
to request an ID token.
id_token token
(6), a response_type
to request an ID token
and an access token.
none
(0), a response_type
to request no access credentials.
token
(2), a response_type
to request an access token.