Interface AuthTokenFacade

All Known Implementing Classes:
DefaultAuthTokenFacade, DwcAuthTokenFacade
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AuthTokenFacade
Facade for retrieving the current AuthToken.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final AuthTokenFacade
    "Null" implementation of this interface, to be used in case no implementation could be determined with the ServiceLoader pattern.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.vavr.control.Try<AuthToken>
    Returns a Try of the current AuthToken.
  • Field Details

    • NULL

      static final AuthTokenFacade NULL
      "Null" implementation of this interface, to be used in case no implementation could be determined with the ServiceLoader pattern.

      This method will return a failed Try in case the tryGetCurrentToken() gets invoked.

  • Method Details

    • tryGetCurrentToken

      @Nonnull io.vavr.control.Try<AuthToken> tryGetCurrentToken()
      Returns a Try of the current AuthToken. An AuthToken is not available if no request is available or the request does not contain an "Authorization" header.
      Returns:
      A Try of the current AuthToken.