Enum GrantType
- java.lang.Object
-
- java.lang.Enum<GrantType>
-
- io.micronaut.security.oauth2.grants.GrantType
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<GrantType>
public enum GrantType extends java.lang.Enum<GrantType>
The OAuth 2.0 grant types.- Since:
- 1.2.0
- See Also:
- OAuth 2.0 Grant Types
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTHORIZATION_CODEThe Authorization Code grant type is used by confidential and public clients to exchange an authorization code for an access token.CLIENT_CREDENTIALSThe Client Credentials grant type is used by clients to obtain an access token outside of the context of a user.IMPLICITThe implicit grant is a simplified authorization code flow optimized for clients implemented in a browser using a scripting language such as JavaScript.JWT_BEARER_ASSERTION_GRANTPASSWORDThe Password grant type is used by first-party clients to exchange a user's credentials for an access token.REFRESH_TOKENOAuth 2.0 refresh tokens.SAML_2_0_BEARER_ASSERTION_GRANT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()static GrantTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static GrantType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CLIENT_CREDENTIALS
public static final GrantType CLIENT_CREDENTIALS
The Client Credentials grant type is used by clients to obtain an access token outside of the context of a user. This is typically used by clients to access resources about themselves rather than to access a user's resources.- See Also:
- Client Credentials
-
AUTHORIZATION_CODE
public static final GrantType AUTHORIZATION_CODE
The Authorization Code grant type is used by confidential and public clients to exchange an authorization code for an access token.- See Also:
- Authorization code
-
REFRESH_TOKEN
public static final GrantType REFRESH_TOKEN
OAuth 2.0 refresh tokens. Refresh tokens are issued to the client by the authorization server and are used to obtain a new access token when the current access token becomes invalid or expires, or to obtain additional access tokens with identical or narrower scope.- See Also:
- Refresh Token
-
IMPLICIT
public static final GrantType IMPLICIT
The implicit grant is a simplified authorization code flow optimized for clients implemented in a browser using a scripting language such as JavaScript. In the implicit flow, instead of issuing the client an authorization code, the client is issued an access token directly- See Also:
- Implicit
-
PASSWORD
public static final GrantType PASSWORD
The Password grant type is used by first-party clients to exchange a user's credentials for an access token. Resource Owner Password Credentials
-
JWT_BEARER_ASSERTION_GRANT
public static final GrantType JWT_BEARER_ASSERTION_GRANT
-
SAML_2_0_BEARER_ASSERTION_GRANT
public static final GrantType SAML_2_0_BEARER_ASSERTION_GRANT
-
-
Method Detail
-
values
public static GrantType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GrantType c : GrantType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GrantType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<GrantType>- Returns:
- The OAuth 2.0. Grant Type
-
-