Class AbstractRemoteAuthTokenAPIHandler.TokenInfo

    • Field Detail

      • lastUpdate

        protected java.time.Instant lastUpdate
        Timestamp of when the token has been fetched
      • refreshOffset

        protected long refreshOffset
        ms of offset for token expiry
    • Constructor Detail

      • TokenInfo

        protected TokenInfo()
    • Method Detail

      • tokenExpired

        public boolean tokenExpired()
        Check for token expiration
        Returns:
        true if expired or no token is available, false otherwise.
      • expiryInstant

        public java.time.Instant expiryInstant()
        Calculate the Instant after which the token should be refreshed (expiresAt minus the refreshOffset).
        Returns:
        The Instant after which the token shall be refreshed. null if token cannot be refreshed.
      • expiresAt

        public java.lang.Long expiresAt()
      • parse

        public void parse​(TokenResponse tokenResponse)
        Copy data from the response to me and set lastUpdate.
        Parameters:
        tokenResponse - The TokenResponse.