public enum OAuth2FlowType extends Enum<OAuth2FlowType>
Enum Constant and Description |
---|
AAD_OBO
Extension OAuth2 flows to perform JSON Web Token Bearer Token
authentication "On-Behalf-Of an existing user.
|
AUTH_CODE
The authorization code is obtained by using an authorization server
as an intermediary between the client and resource owner.
|
AUTH_JWT
RFC7523: JSON Web Token Bearer Token as a means for requesting an
OAuth 2.0 access token as well as for client authentication.
|
CLIENT
The client credentials (or other forms of client authentication) can
be used as an authorization grant when the authorization scope is
limited to the protected resources under the control of the client,
or to protected resources previously arranged with the authorization
server.
|
IMPLICIT
The implicit grant is a simplified authorization code flow optimized
for clients implemented in a browser using a scripting language such
as JavaScript.
|
PASSWORD
The resource owner password credentials (i.e., username and password)
can be used directly as an authorization grant to obtain an access
token.
|
Modifier and Type | Method and Description |
---|---|
static OAuth2FlowType |
getFlow(String grantType) |
String |
getGrantType() |
static OAuth2FlowType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OAuth2FlowType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OAuth2FlowType AUTH_CODE
Before directing the resource owner back to the client with the authorization code, the authorization server authenticates the resource owner and obtains authorization. Because the resource owner only authenticates with the authorization server, the resource owner's credentials are never shared with the client.
The authorization code provides a few important security benefits, such as the ability to authenticate the client, as well as the transmission of the access token directly to the client without passing it through the resource owner's user-agent and potentially exposing it to others, including the resource owner.
public static final OAuth2FlowType IMPLICIT
When issuing an access token during the implicit grant flow, the authorization server does not authenticate the client. In some cases, the client identity can be verified via the redirection URI used to deliver the access token to the client. The access token may be exposed to the resource owner or other applications with access to the resource owner's user-agent.
Implicit grants improve the responsiveness and efficiency of some clients (such as a client implemented as an in-browser application), since it reduces the number of round trips required to obtain an access token. However, this convenience should be weighed against the security implications of using implicit grants, especially when the authorization code grant type is available.
public static final OAuth2FlowType PASSWORD
Even though this grant type requires direct client access to the resource owner credentials, the resource owner credentials are used for a single request and are exchanged for an access token. This grant type can eliminate the need for the client to store the resource owner credentials for future use, by exchanging the credentials with a long-lived access token or refresh token.
public static final OAuth2FlowType CLIENT
public static final OAuth2FlowType AUTH_JWT
public static final OAuth2FlowType AAD_OBO
public static OAuth2FlowType[] values()
for (OAuth2FlowType c : OAuth2FlowType.values()) System.out.println(c);
public static OAuth2FlowType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getGrantType()
public static OAuth2FlowType getFlow(String grantType)
Copyright © 2024 Eclipse. All rights reserved.