Enum Class OauthField

java.lang.Object
java.lang.Enum<OauthField>
org.refcodes.web.OauthField
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.
  • Enum Constant Details

    • 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 also TokenType. "... 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 to GrantType.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)
    • USER_NAME

      public static final OauthField USER_NAME
      "... 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 Details

    • values

      public static OauthField[] 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

      public static OauthField valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getHeaderField

      public HeaderField getHeaderField()
      Retrieves the HeaderField from the HeaderField property.
      Specified by:
      getHeaderField in interface HeaderFieldAccessor
      Returns:
      The HeaderField stored by the HeaderField property.
    • getPath

      public String getPath()
      Specified by:
      getPath in interface org.refcodes.mixin.PathAccessor
    • getName

      public String getName()
      Returns the field's name, be it a HeaderFields or a FormFields entry.
      Specified by:
      getName in interface org.refcodes.mixin.NameAccessor
    • fromPath

      public static OauthField fromPath(String aPath)
      Resolves the OauthField from the HttpBodyMap path.
      Parameters:
      aPath - The path for which to retrieve the OauthField.
      Returns:
      The OauthField or null if none was determined.
    • fromHeaderField

      public static OauthField fromHeaderField(HeaderField aHeaderField)
      Resolves the OauthField from the HeaderField.
      Parameters:
      aHeaderField - The HeaderField for which to retrieve the OauthField.
      Returns:
      The OauthField or null if none was determined.