Class MongoTokensWithExpirationDao
java.lang.Object
dev.getelements.elements.dao.mongo.MongoTokensWithExpirationDao
- All Implemented Interfaces:
TokensWithExpirationDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateToken
(TokenWithExpiration token) Creates an ofTokenWithExpiration
void
deleteToken
(String tokenId) Deletes the token using its id.void
deleteTokensByUser
(User user) Deletes all existing tokens associated with given userdev.morphia.Datastore
getTokenExpiry
(String tokenId) Given the token id, will return it's expiry valuevoid
setDatastore
(dev.morphia.Datastore datastore) void
setDozerMapper
(MapperRegistry dozerMapperRegistry) void
setMongoDBUtils
(MongoDBUtils mongoDBUtils)
-
Constructor Details
-
MongoTokensWithExpirationDao
public MongoTokensWithExpirationDao()
-
-
Method Details
-
createToken
Description copied from interface:TokensWithExpirationDao
Creates an ofTokenWithExpiration
- Specified by:
createToken
in interfaceTokensWithExpirationDao
- Parameters:
token
-- Returns:
- the token's id
-
getTokenExpiry
Description copied from interface:TokensWithExpirationDao
Given the token id, will return it's expiry value- Specified by:
getTokenExpiry
in interfaceTokensWithExpirationDao
- Parameters:
tokenId
-- Returns:
-
deleteTokensByUser
Description copied from interface:TokensWithExpirationDao
Deletes all existing tokens associated with given user- Specified by:
deleteTokensByUser
in interfaceTokensWithExpirationDao
- Parameters:
user
-
-
deleteToken
Description copied from interface:TokensWithExpirationDao
Deletes the token using its id.- Specified by:
deleteToken
in interfaceTokensWithExpirationDao
- Parameters:
tokenId
-
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getMongoDBUtils
-
setMongoDBUtils
-
getDozerMapper
-
setDozerMapper
-