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 ofTokenWithExpirationvoiddeleteToken(String tokenId) Deletes the token using its id.voiddeleteTokensByUser(User user) Deletes all existing tokens associated with given userdev.morphia.DatastoregetTokenExpiry(String tokenId) Given the token id, will return it's expiry valuevoidsetDatastore(dev.morphia.Datastore datastore) voidsetDozerMapper(MapperRegistry dozerMapperRegistry) voidsetMongoDBUtils(MongoDBUtils mongoDBUtils)
-
Constructor Details
-
MongoTokensWithExpirationDao
public MongoTokensWithExpirationDao()
-
-
Method Details
-
createToken
Description copied from interface:TokensWithExpirationDaoCreates an ofTokenWithExpiration- Specified by:
createTokenin interfaceTokensWithExpirationDao- Parameters:
token-- Returns:
- the token's id
-
getTokenExpiry
Description copied from interface:TokensWithExpirationDaoGiven the token id, will return it's expiry value- Specified by:
getTokenExpiryin interfaceTokensWithExpirationDao- Parameters:
tokenId-- Returns:
-
deleteTokensByUser
Description copied from interface:TokensWithExpirationDaoDeletes all existing tokens associated with given user- Specified by:
deleteTokensByUserin interfaceTokensWithExpirationDao- Parameters:
user-
-
deleteToken
Description copied from interface:TokensWithExpirationDaoDeletes the token using its id.- Specified by:
deleteTokenin interfaceTokensWithExpirationDao- Parameters:
tokenId-
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getMongoDBUtils
-
setMongoDBUtils
-
getDozerMapper
-
setDozerMapper
-