Interface AuthToken

All Known Implementing Classes:
AuthToken.Basic

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

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

    Modifier and Type
    Method
    Description
    Duration until expiration.
    boolean
    Whether the token has expired or no longer valid.
    static AuthToken
    of(String token, Instant validUntil)
    Create an AuthToken with the given token and when it expires.
    The Authorization bearer token.
  • Method Details

    • token

      String token()
      The Authorization bearer token.
    • isExpired

      boolean isExpired()
      Whether the token has expired or no longer valid.
    • expiration

      Duration expiration()
      Duration until expiration.
    • of

      static AuthToken of(String token, Instant validUntil)
      Create an AuthToken with the given token and when it expires.