-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document definitions of Multiple-Valued Response Type Combinations
- Loading branch information
1 parent
d496a44
commit 86ef17d
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,48 @@ | ||
public enum OAuth2ResponseTypes { | ||
public static let code = "code" | ||
public static let token = "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. | ||
*/ | ||
public static let idToken = "id_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. | ||
*/ | ||
public static let idTokenToken = "id_token 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. | ||
*/ | ||
public static let codeIdToken = "code id_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. | ||
*/ | ||
public static let codeToken = "code 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. | ||
*/ | ||
public static let codeIdTokenToken = "code id_token token" | ||
} |