Interface ApiTokenService
- All Known Implementing Classes:
ApiTokenServiceImpl
public interface ApiTokenService
API Token services
-
Method Summary
Modifier and TypeMethodDescriptioncreateToken(AclSid sid, String label, Instant expires) Register a new API token for the specifiedsidwith a label and expiration date.encodeToken(String token) Generate the encoded token string.Get token by its persisted value.org.springframework.data.domain.Page<ApiToken>listTokens(org.springframework.data.domain.Pageable page) listTokensForSid(AclSid sid)
-
Method Details
-
encodeToken
Generate the encoded token string.- Parameters:
token- token value- Returns:
- encoded token value
-
createToken
Register a new API token for the specifiedsidwith a label and expiration date.- Parameters:
sid- the SID represented by the tokenlabel- a token friendly name, unique to thesidexpires- the expiration date of the token- Returns:
- a new API token with
token.tokenprovided in plain-text
-
loadById
-
getToken
Get token by its persisted value. This is used by theInvalidatedTokenFilterandApiTokenDetailsService.- Parameters:
encodedToken- encoded token- Returns:
nullif token not found
-
listTokensForSid
-
listTokens
org.springframework.data.domain.Page<ApiToken> listTokens(org.springframework.data.domain.Pageable page) -
remove
-
update
-