Interface AuthToken

All Known Implementing Classes:
AuthToken.Basic

public interface AuthToken
Represents an Authorization Bearer token that can be held on the context.

Typically the token will be valid for a period and then expire.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Standard AuthToken implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Return true if the token has expired or is no longer valid.
    static AuthToken
    of(String token, Instant validUntil)
    Create an return a AuthToken with the given token and time it is valid until.
    Return the Authorization bearer token.
  • Method Details

    • token

      String token()
      Return the Authorization bearer token.
    • isExpired

      boolean isExpired()
      Return true if the token has expired or is no longer valid.
    • of

      static AuthToken of(String token, Instant validUntil)
      Create an return a AuthToken with the given token and time it is valid until.