Interface ApiTokenService

All Known Implementing Classes:
ApiTokenServiceImpl

public interface ApiTokenService
API Token services
  • Method Details

    • encodeToken

      String encodeToken(String token)
      Generate the encoded token string.
      Parameters:
      token - token value
      Returns:
      encoded token value
    • createToken

      ApiToken createToken(AclSid sid, String label, Instant expires)
      Register a new API token for the specified sid with a label and expiration date.
      Parameters:
      sid - the SID represented by the token
      label - a token friendly name, unique to the sid
      expires - the expiration date of the token
      Returns:
      a new API token with token.token provided in plain-text
    • loadById

      ApiToken loadById(Long id)
    • getToken

      ApiToken getToken(String encodedToken)
      Get token by its persisted value. This is used by the InvalidatedTokenFilter and ApiTokenDetailsService.
      Parameters:
      encodedToken - encoded token
      Returns:
      null if token not found
    • listTokensForSid

      List<ApiToken> listTokensForSid(AclSid sid)
    • listTokens

      org.springframework.data.domain.Page<ApiToken> listTokens(org.springframework.data.domain.Pageable page)
    • remove

      ApiToken remove(ApiToken apiToken)
    • update

      ApiToken update(ApiToken apiToken)