Package org.refcodes.net
Enum OauthField
- java.lang.Object
-
- java.lang.Enum<OauthField>
-
- org.refcodes.net.OauthField
-
- All Implemented Interfaces:
Serializable
,Comparable<OauthField>
,org.refcodes.mixin.NameAccessor
,org.refcodes.mixin.PathAccessor
,HeaderFieldAccessor
public enum OauthField extends Enum<OauthField> implements org.refcodes.mixin.PathAccessor, HeaderFieldAccessor, org.refcodes.mixin.NameAccessor
The Enum OauthField.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.net.HeaderFieldAccessor
HeaderFieldAccessor.HeaderFieldBuilder<B extends HeaderFieldAccessor.HeaderFieldBuilder<B>>, HeaderFieldAccessor.HeaderFieldMutator, HeaderFieldAccessor.HeaderFieldProperty
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCESS_TOKEN
"...CLIENT_ID
"...CLIENT_SECRET
"...EXPIRES_IN
"...GRANT_TYPE
Must be set toGrantType.AUTHORIZATION_CODE
.NOT_BEFORE_POLICY
Probably legacy, encountered upon using KeyCloak.PASSWORD
"...REDIRECT_URI
"...REFRESH_EXPIRES_IN
Probably legacy, encountered upon using KeyCloak.REFRESH_TOKEN
"...SCOPE
OAuth scopes let you specify exactly how your application needs to access a user's resource.SESSION_STATE
Probably legacy, encountered upon using KeyCloak.TOKEN_TYPE
Token type, see alsoTokenType
.USERNAME
"...
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OauthField
fromHeaderField(HeaderField aHeaderField)
Resolves theOauthField
from theHeaderField
.static OauthField
fromPath(String aPath)
Resolves theOauthField
from theHttpBodyMap
path.HeaderField
getHeaderField()
Retrieves theHeaderField
from theHeaderField
property.String
getName()
Returns the field's name, be it aHeaderFields
or aFormFields
entry.String
getPath()
static OauthField
valueOf(String name)
Returns the enum constant of this type with the specified name.static OauthField[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SCOPE
public static final OauthField SCOPE
OAuth scopes let you specify exactly how your application needs to access a user's resource. Scope is specified on either the authorization or token endpoints using the parameter scope. Scope is expressed as a set of case-sensitive and space-delimited strings. The authorization server may override the scope request, in this case it must include scope in its response to inform a client of their actual scope. When a scope is not specified, the server may either fallback to a well-documented default, or fail the request. "... OPTIONAL, if identical to the scope requested by the client; otherwise, REQUIRED. The scope of the access token as described by Section 3.3. ...", "... OPTIONAL. The scope of the access request as described by Section 3.3 ..." (https://tools.ietf.org/html/rfc6749)
-
EXPIRES_IN
public static final OauthField EXPIRES_IN
"... RECOMMENDED. The lifetime in seconds of the access token. For example, the value "3600" denotes that the access token will expire in one hour from the time the response was generated. If omitted, the authorization server SHOULD provide the expiration time via other means or document the default value ..." (https://tools.ietf.org/html/rfc6749)
-
REFRESH_TOKEN
public static final OauthField REFRESH_TOKEN
"... OPTIONAL. The refresh token, which can be used to obtain new access tokens using the same authorization grant as described in Section 6. ..." (https://tools.ietf.org/html/rfc6749)
-
TOKEN_TYPE
public static final OauthField TOKEN_TYPE
Token type, see alsoTokenType
. "... REQUIRED. The type of the token issued as described in Section 7.1. Value is case insensitive ..." (https://tools.ietf.org/html/rfc6749)
-
ACCESS_TOKEN
public static final OauthField ACCESS_TOKEN
"... REQUIRED. The access token issued by the authorization server ..." (https://tools.ietf.org/html/rfc6749)
-
CLIENT_ID
public static final OauthField CLIENT_ID
"... REQUIRED. The client identifier issued to the client during the registration process described by Section 2.2. ..." (https://tools.ietf.org/html/rfc6749)
-
CLIENT_SECRET
public static final OauthField CLIENT_SECRET
"... REQUIRED. The client secret. The client MAY omit the parameter if the client secret is an empty string ..." (https://tools.ietf.org/html/rfc6749)
-
GRANT_TYPE
public static final OauthField GRANT_TYPE
Must be set toGrantType.AUTHORIZATION_CODE
. "... grant_type REQUIRED. Value MUST be set to "authorization_code" ..." (https://tools.ietf.org/html/rfc6749)
-
REDIRECT_URI
public static final OauthField REDIRECT_URI
"... REQUIRED, if the "redirect_uri" parameter was included in the authorization request as described in Section 4.1.1, and their values MUST be identical ..." (https://tools.ietf.org/html/rfc6749)
-
USERNAME
public static final OauthField USERNAME
"... REQUIRED. The resource owner username ..." (https://tools.ietf.org/html/rfc6749)
-
PASSWORD
public static final OauthField PASSWORD
"... REQUIRED. The resource owner password ..." (https://tools.ietf.org/html/rfc6749)
-
SESSION_STATE
public static final OauthField SESSION_STATE
Probably legacy, encountered upon using KeyCloak.
-
REFRESH_EXPIRES_IN
public static final OauthField REFRESH_EXPIRES_IN
Probably legacy, encountered upon using KeyCloak.
-
NOT_BEFORE_POLICY
public static final OauthField NOT_BEFORE_POLICY
Probably legacy, encountered upon using KeyCloak.
-
-
Method Detail
-
values
public static OauthField[] 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 (OauthField c : OauthField.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OauthField valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getHeaderField
public HeaderField getHeaderField()
Retrieves theHeaderField
from theHeaderField
property.- Specified by:
getHeaderField
in interfaceHeaderFieldAccessor
- Returns:
- The
HeaderField
stored by theHeaderField
property.
-
getPath
public String getPath()
- Specified by:
getPath
in interfaceorg.refcodes.mixin.PathAccessor
-
getName
public String getName()
Returns the field's name, be it aHeaderFields
or aFormFields
entry.- Specified by:
getName
in interfaceorg.refcodes.mixin.NameAccessor
-
fromPath
public static OauthField fromPath(String aPath)
Resolves theOauthField
from theHttpBodyMap
path.- Parameters:
aPath
- The path for which to retrieve theOauthField
.- Returns:
- The
OauthField
or null if none was determined.
-
fromHeaderField
public static OauthField fromHeaderField(HeaderField aHeaderField)
Resolves theOauthField
from theHeaderField
.- Parameters:
aHeaderField
- TheHeaderField
for which to retrieve theOauthField
.- Returns:
- The
OauthField
or null if none was determined.
-
-