Interface AccessTokenService
-
public interface AccessTokenService
Service for managing access tokens. In order to call any method of this API, a client must use a master access token.- Author:
- avasquez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AccessToken
createToken(AccessToken token)
Creates a new access token.void
deleteToken(String id)
Deletes the token with the given ID.List<AccessToken>
getAllTokens()
Returns all the access tokens in the DB.AccessToken
getToken(String id)
Returns the token for the given ID.
-
-
-
Method Detail
-
createToken
AccessToken createToken(AccessToken token) throws ProfileException
Creates a new access token.- Parameters:
token
- the token to create- Returns:
- the created token
- Throws:
ProfileException
-
getToken
AccessToken getToken(String id) throws ProfileException
Returns the token for the given ID.- Parameters:
id
- the ID of the token- Returns:
- the token, or null if not found
- Throws:
ProfileException
-
getAllTokens
List<AccessToken> getAllTokens() throws ProfileException
Returns all the access tokens in the DB.- Returns:
- all the access tokens
- Throws:
ProfileException
-
deleteToken
void deleteToken(String id) throws ProfileException
Deletes the token with the given ID.- Parameters:
id
- the ID of the token- Throws:
ProfileException
-
-