-
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.
Add new
Constants
module containing common OAuth2 strings (as defin…
…ed in RFCs)
- Loading branch information
1 parent
061ed85
commit 2b38a87
Showing
5 changed files
with
63 additions
and
1 deletion.
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
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
public enum OAuth2GrantTypes { | ||
public static let password = "password" | ||
public static let authorizationCode = "authorization_code" | ||
public static let clientCredentials = "client_credentials" | ||
public static let refreshToken = "refresh_token" | ||
public static let implicit = "implicit" | ||
public static let saml2Bearer = "urn:ietf:params:oauth:grant-type:saml2-bearer" | ||
public static let jwtBearer = "urn:ietf:params:oauth:grant-type:jwt-bearer" | ||
public static let deviceCode = "urn:ietf:params:oauth:grant-type:device_code" | ||
public static let tokenExchange = "urn:ietf:params:oauth:grant-type:token-exchange" | ||
public static let ciba = "urn:ietf:params:oauth:grant-type:ciba" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
public enum OAuth2ResponseTypes { | ||
public static let code = "code" | ||
public static let token = "token" | ||
public static let idToken = "id_token" | ||
public static let idTokenToken = "id_token token" | ||
public static let codeIdToken = "code id_token" | ||
public static let codeToken = "code token" | ||
public static let codeIdTokenToken = "code id_token token" | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
public enum OAuth2TokenTypeIdentifiers { | ||
public static let accessToken = "urn:ietf:params:oauth:token-type:access_token" | ||
public static let identityToken = "urn:ietf:params:oauth:token-type:id_token" | ||
public static let refreshToken = "urn:ietf:params:oauth:token-type:refresh_token" | ||
public static let saml11 = "urn:ietf:params:oauth:token-type:saml1" | ||
public static let saml2 = "urn:ietf:params:oauth:token-type:saml2" | ||
public static let jwt = "urn:ietf:params:oauth:token-type:jwt" | ||
} |