Class OAuth2


  • public final class OAuth2
    extends Object
    OAuth2 utility class.
    • Method Detail

      • getBearerAccessToken

        public static String getBearerAccessToken​(String authorizationHeader)
        Extracts the bearer token from the request's authorization header.

        Expected ABNF format (as per RFC 6750):

             
             b64token    = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" ) *"="
             credentials = "Bearer" 1*SP b64token
             
         
        Parameters:
        authorizationHeader - The authorization header from the request.
        Returns:
        The access token, or null if the access token was not present or was not using Bearer authorization.