Enum AuthorizationMethod

    • Enum Constant Detail

      • AUTHORIZATION_REQUEST_HEADER_FIELD

        public static final AuthorizationMethod AUTHORIZATION_REQUEST_HEADER_FIELD
        When sending the access token in the "Authorization" request header field defined by HTTP/1.1, Part 7 [I-D.ietf-httpbis-p7-auth], the client uses the "Bearer" authentication scheme to transmit the access token.
      • FORM_ENCODED_BODY_PARAMETER

        public static final AuthorizationMethod FORM_ENCODED_BODY_PARAMETER
        When sending the access token in the HTTP request entity-body, the client adds the access token to the request body using the "access_token" parameter. The client MUST NOT use this method unless all of the following conditions are met:

        - The HTTP request entity-header includes the "Content-Type" header field set to "application/x-www-form-urlencoded".

        - The entity-body follows the encoding requirements of the "application/x-www-form-urlencoded" content-type as defined by HTML 4.01 [W3C.REC-html401-19991224].

        - The HTTP request entity-body is single-part.

        - The content to be encoded in the entity-body MUST consist entirely of ASCII [USASCII] characters.

        - The HTTP request method is one for which the request body has defined semantics. In particular, this means that the "GET" method MUST NOT be used.

        The entity-body MAY include other request-specific parameters, in which case, the "access_token" parameter MUST be properly separated from the request-specific parameters using "&" character(s) (ASCII code 38).

      • URL_QUERY_PARAMETER

        public static final AuthorizationMethod URL_QUERY_PARAMETER
        When sending the access token in the HTTP request URI, the client adds the access token to the request URI query component as defined by Uniform Resource Identifier (URI) [RFC3986] using the "access_token" parameter.

        The HTTP request URI query can include other request-specific parameters, in which case, the "access_token" parameter MUST be properly separated from the request-specific parameters using "&" character(s) (ASCII code 38).

        Because of the security weaknesses associated with the URI method (see Section 5), including the high likelihood that the URL containing the access token will be logged, it SHOULD NOT be used unless it is impossible to transport the access token in the "Authorization" request header field or the HTTP request entity-body. Resource servers MAY support this method.

    • Method Detail

      • values

        public static AuthorizationMethod[] 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 (AuthorizationMethod c : AuthorizationMethod.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AuthorizationMethod 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 name
        NullPointerException - if the argument is null