Class AccessTokenServiceImpl
java.lang.Object
org.craftercms.profile.services.impl.AccessTokenServiceImpl
- All Implemented Interfaces:
AccessTokenService
Default implementation of
AccessTokenService.- Author:
- avasquez
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckIfTokenActionIsAllowed(String id, org.craftercms.profile.services.impl.AccessTokenServiceImpl.Action action) createToken(AccessToken token) Creates a new access token.voiddeleteToken(String id) Deletes the token with the given ID.Returns all the access tokens in the DB.Returns the token for the given ID.
-
Field Details
-
LOG_KEY_ACCESS_TOKEN_CREATED
- See Also:
-
LOG_KEY_ACCESS_TOKEN_DELETED
- See Also:
-
ERROR_KEY_CREATE_ACCESS_TOKEN_ERROR
- See Also:
-
ERROR_KEY_GET_ACCESS_TOKEN_ERROR
- See Also:
-
ERROR_KEY_GET_ALL_ACCESS_TOKENS_ERROR
- See Also:
-
ERROR_KEY_DELETE_ACCESS_TOKEN_ERROR
- See Also:
-
accessTokenRepository
-
hashSalt
protected byte[] hashSalt
-
-
Constructor Details
-
AccessTokenServiceImpl
-
-
Method Details
-
createToken
Description copied from interface:AccessTokenServiceCreates a new access token.- Specified by:
createTokenin interfaceAccessTokenService- Parameters:
token- the token to create- Returns:
- the created token
- Throws:
ProfileException
-
getToken
Description copied from interface:AccessTokenServiceReturns the token for the given ID.- Specified by:
getTokenin interfaceAccessTokenService- Parameters:
id- the ID of the token- Returns:
- the token, or null if not found
- Throws:
ProfileException
-
getAllTokens
Description copied from interface:AccessTokenServiceReturns all the access tokens in the DB.- Specified by:
getAllTokensin interfaceAccessTokenService- Returns:
- all the access tokens
- Throws:
ProfileException
-
deleteToken
Description copied from interface:AccessTokenServiceDeletes the token with the given ID.- Specified by:
deleteTokenin interfaceAccessTokenService- Parameters:
id- the ID of the token- Throws:
ProfileException
-
checkIfTokenActionIsAllowed
protected void checkIfTokenActionIsAllowed(String id, org.craftercms.profile.services.impl.AccessTokenServiceImpl.Action action)
-