com.holonplatform.auth.internal

## Class BearerAuthenticationTokenResolver

- java.lang.Object
- - com.holonplatform.auth.internal.AbstractHttpAuthenticationTokenResolver
  - - com.holonplatform.auth.internal.BearerAuthenticationTokenResolver

- All Implemented Interfaces:
    AuthenticationToken.AuthenticationTokenResolver<HttpRequest>

      public class BearerAuthenticationTokenResolver
      extends AbstractHttpAuthenticationTokenResolver

  OAuth2 `AuthenticationToken.AuthenticationTokenResolver` for HTTP requests providing `HttpHeaders.SCHEME_BEARER` authentication scheme using `HttpHeaders.AUTHORIZATION` header.
  Since:
    5.0.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BearerAuthenticationTokenResolver()` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Optional<AuthenticationToken>` | `getAuthenticationToken(HttpRequest request)` Parse given `request` message and try to obtain an `AuthenticationToken` if request is eligible for this resolver authentication mechanism.

    - ### Methods inherited from class com.holonplatform.auth.internal.AbstractHttpAuthenticationTokenResolver

      `getMessageType, getScheme`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.holonplatform.auth.AuthenticationToken.AuthenticationTokenResolver

      `create, create`

- - ### Constructor Detail

    - #### BearerAuthenticationTokenResolver

          public BearerAuthenticationTokenResolver()

      Constructor

  - ### Method Detail

    - #### getAuthenticationToken

          public Optional<AuthenticationToken> getAuthenticationToken(HttpRequest request)
                                                               throws AuthenticationException

      Description copied from interface: `AuthenticationToken.AuthenticationTokenResolver`
      Parse given `request` message and try to obtain an `AuthenticationToken` if request is eligible for this resolver authentication mechanism.
      Parameters:
        `request` - Authentication request
      Returns:
        AuthenticationToken, or an empty Optional if request is not eligible for this resolver authentication mechanism
      Throws:
        `AuthenticationException` - Id resolver recognized given request but it is somehow malformed or incomplete

Copyright © 2019 The Holon Platform. All rights reserved.