Skip to main content
Module

x/authlete_deno/mod.ts>ResponseType

Authlete Library for Deno
Latest
class ResponseType
Re-export
import { ResponseType } from "https://deno.land/x/authlete_deno@v1.2.10/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 parameter id_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 a redirect_uri is supplied, the User Agent SHOULD be redirected there after granting or denying access. The request MAY include a state 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 a redirect_uri is supplied, the User Agent SHOULD be redirected there after granting or denying access. The request MAY include a state 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 an id_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 an id_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, an id_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.

Constructors

new
ResponseType(
value: number,
string: string,
flags: number,
)

The private constructor.

Properties

flags: number

The flag to indicate the type of this response type.

Static Properties

readonly
CODE: ResponseType

code (1), a response_type to request an authorization code.

readonly
CODE_ID_TOKEN: ResponseType

code id_token (5), a response_type to request an authorization code and an ID token.

readonly
CODE_ID_TOKEN_TOKEN: ResponseType

code id_token token (7), a response_type to request an authorization code, an ID token and an access token.

readonly
CODE_TOKEN: ResponseType

code token (4), a response_type to request an authorization code and an access token.

readonly
ID_TOKEN: ResponseType

id_token (3), a response_type to request an ID token.

readonly
ID_TOKEN_TOKEN: ResponseType

id_token token (6), a response_type to request an ID token and an access token.

readonly
NONE: ResponseType

none (0), a response_type to request no access credentials.

readonly
TOKEN: ResponseType

token (2), a response_type to request an access token.