Class AccessTokenServiceImpl
- java.lang.Object
-
- org.craftercms.profile.services.impl.AccessTokenServiceImpl
-
- All Implemented Interfaces:
AccessTokenService
public class AccessTokenServiceImpl extends Object implements AccessTokenService
Default implementation ofAccessTokenService
.- Author:
- avasquez
-
-
Field Summary
Fields Modifier and Type Field Description protected AccessTokenRepository
accessTokenRepository
static String
ERROR_KEY_CREATE_ACCESS_TOKEN_ERROR
static String
ERROR_KEY_DELETE_ACCESS_TOKEN_ERROR
static String
ERROR_KEY_GET_ACCESS_TOKEN_ERROR
static String
ERROR_KEY_GET_ALL_ACCESS_TOKENS_ERROR
protected byte[]
hashSalt
static String
LOG_KEY_ACCESS_TOKEN_CREATED
static String
LOG_KEY_ACCESS_TOKEN_DELETED
-
Constructor Summary
Constructors Constructor Description AccessTokenServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkIfTokenActionIsAllowed(String id, org.craftercms.profile.services.impl.AccessTokenServiceImpl.Action action)
AccessToken
createToken(AccessToken token)
void
deleteToken(String id)
List<AccessToken>
getAllTokens()
AccessToken
getToken(String id)
void
setAccessTokenRepository(AccessTokenRepository accessTokenRepository)
-
-
-
Field Detail
-
LOG_KEY_ACCESS_TOKEN_CREATED
public static final String LOG_KEY_ACCESS_TOKEN_CREATED
- See Also:
- Constant Field Values
-
LOG_KEY_ACCESS_TOKEN_DELETED
public static final String LOG_KEY_ACCESS_TOKEN_DELETED
- See Also:
- Constant Field Values
-
ERROR_KEY_CREATE_ACCESS_TOKEN_ERROR
public static final String ERROR_KEY_CREATE_ACCESS_TOKEN_ERROR
- See Also:
- Constant Field Values
-
ERROR_KEY_GET_ACCESS_TOKEN_ERROR
public static final String ERROR_KEY_GET_ACCESS_TOKEN_ERROR
- See Also:
- Constant Field Values
-
ERROR_KEY_GET_ALL_ACCESS_TOKENS_ERROR
public static final String ERROR_KEY_GET_ALL_ACCESS_TOKENS_ERROR
- See Also:
- Constant Field Values
-
ERROR_KEY_DELETE_ACCESS_TOKEN_ERROR
public static final String ERROR_KEY_DELETE_ACCESS_TOKEN_ERROR
- See Also:
- Constant Field Values
-
accessTokenRepository
protected AccessTokenRepository accessTokenRepository
-
hashSalt
protected byte[] hashSalt
-
-
Method Detail
-
setAccessTokenRepository
public void setAccessTokenRepository(AccessTokenRepository accessTokenRepository)
-
createToken
public AccessToken createToken(AccessToken token) throws ProfileException
- Specified by:
createToken
in interfaceAccessTokenService
- Throws:
ProfileException
-
getToken
public AccessToken getToken(String id) throws ProfileException
- Specified by:
getToken
in interfaceAccessTokenService
- Throws:
ProfileException
-
getAllTokens
public List<AccessToken> getAllTokens() throws ProfileException
- Specified by:
getAllTokens
in interfaceAccessTokenService
- Throws:
ProfileException
-
deleteToken
public void deleteToken(String id) throws ProfileException
- Specified by:
deleteToken
in interfaceAccessTokenService
- Throws:
ProfileException
-
checkIfTokenActionIsAllowed
protected void checkIfTokenActionIsAllowed(String id, org.craftercms.profile.services.impl.AccessTokenServiceImpl.Action action)
-
-