- All Implemented Interfaces:
Serializable
,Comparable<OauthField>
,Constable
,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 class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface org.refcodes.web.HeaderFieldAccessor
HeaderFieldAccessor.HeaderFieldBuilder<B extends HeaderFieldAccessor.HeaderFieldBuilder<B>>, HeaderFieldAccessor.HeaderFieldMutator, HeaderFieldAccessor.HeaderFieldProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.NameAccessor
org.refcodes.mixin.NameAccessor.NameBuilder<B extends org.refcodes.mixin.NameAccessor.NameBuilder<B>>, org.refcodes.mixin.NameAccessor.NameMutator, org.refcodes.mixin.NameAccessor.NameProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.PathAccessor
org.refcodes.mixin.PathAccessor.PathBuilder<B extends org.refcodes.mixin.PathAccessor.PathBuilder<?>>, org.refcodes.mixin.PathAccessor.PathMutator, org.refcodes.mixin.PathAccessor.PathProperty
-
Enum Constant Summary
Enum ConstantDescription"..."..."..."...Must be set toGrantType.AUTHORIZATION_CODE
. "... grant_type REQUIRED.Probably legacy, encountered upon using KeyCloak."..."...Probably legacy, encountered upon using KeyCloak."...OAuth scopes let you specify exactly how your application needs to access a user's resource.Probably legacy, encountered upon using KeyCloak.Token type, see alsoTokenType
. "..."... -
Method Summary
Modifier and TypeMethodDescriptionstatic OauthField
fromHeaderField
(HeaderField aHeaderField) Resolves theOauthField
from theHeaderField
.static OauthField
Resolves theOauthField
from theHttpBodyMap
path.Retrieves theHeaderField
from theHeaderField
property.getName()
Returns the field's name, be it aHeaderFields
or aFormFields
entry.getPath()
static OauthField
Returns the enum constant of this class with the specified name.static OauthField[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
"... 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
"... 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
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
"... REQUIRED. The access token issued by the authorization server ..." (https://tools.ietf.org/html/rfc6749) -
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
"... 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
Must be set toGrantType.AUTHORIZATION_CODE
. "... grant_type REQUIRED. Value MUST be set to "authorization_code" ..." (https://tools.ietf.org/html/rfc6749) -
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) -
USER_NAME
"... REQUIRED. The resource owner username ..." (https://tools.ietf.org/html/rfc6749) -
PASSWORD
"... REQUIRED. The resource owner password ..." (https://tools.ietf.org/html/rfc6749) -
SESSION_STATE
Probably legacy, encountered upon using KeyCloak. -
REFRESH_EXPIRES_IN
Probably legacy, encountered upon using KeyCloak. -
NOT_BEFORE_POLICY
Probably legacy, encountered upon using KeyCloak.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getHeaderField
Retrieves theHeaderField
from theHeaderField
property.- Specified by:
getHeaderField
in interfaceHeaderFieldAccessor
- Returns:
- The
HeaderField
stored by theHeaderField
property.
-
getPath
- Specified by:
getPath
in interfaceorg.refcodes.mixin.PathAccessor
-
getName
Returns the field's name, be it aHeaderFields
or aFormFields
entry.- Specified by:
getName
in interfaceorg.refcodes.mixin.NameAccessor
-
fromPath
Resolves theOauthField
from theHttpBodyMap
path.- Parameters:
aPath
- The path for which to retrieve theOauthField
.- Returns:
- The
OauthField
or null if none was determined.
-
fromHeaderField
Resolves theOauthField
from theHeaderField
.- Parameters:
aHeaderField
- TheHeaderField
for which to retrieve theOauthField
.- Returns:
- The
OauthField
or null if none was determined.
-