Class MongoSessionDao
java.lang.Object
dev.getelements.elements.dao.mongo.MongoSessionDao
- All Implemented Interfaces:
SessionDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes theSessioninstance.getBySessionSecret(String sessionSecret) Gets theSessionby it's session id, as returned bySessionCreation.getSessionSecret()()}.dev.morphia.Datastorejakarta.inject.Provider<MessageDigest> Refreshs theSessionwith the supplied expiry.voidsetDatastore(dev.morphia.Datastore datastore) voidsetMapper(MapperRegistry mapperRegistry) voidsetMessageDigestProvider(jakarta.inject.Provider<MessageDigest> messageDigestProvider) voidsetMongoDBUtils(MongoDBUtils mongoDBUtils) voidsetMongoUserDao(MongoUserDao mongoUserDao) voidsetValidationHelper(ValidationHelper validationHelper) void
-
Constructor Details
-
MongoSessionDao
public MongoSessionDao()
-
-
Method Details
-
getBySessionSecret
Description copied from interface:SessionDaoGets theSessionby it's session id, as returned bySessionCreation.getSessionSecret()()}. Throwing an appropriate exception type if theSessioncan't be found.- Specified by:
getBySessionSecretin interfaceSessionDao- Parameters:
sessionSecret- the session's ID- Returns:
- the
Sessionnever null
-
refresh
Description copied from interface:SessionDaoRefreshs theSessionwith the supplied expiry.- Specified by:
refreshin interfaceSessionDao- Parameters:
sessionSecret- the session secret keyexpiry- the expiry timestamp, as expression milliseconds since the Unix epoch- Returns:
- the updated
Session
-
create
Description copied from interface:SessionDaoCreates aSessionwith the providedSessionobject. This will return an instance ofSessionCreationproviding a secret key which can be used to access theSessionin the future.- Specified by:
createin interfaceSessionDao- Parameters:
session-- Returns:
- the
SessionCreationas it was created in the database
-
blacklist
Description copied from interface:SessionDaoDeletes theSessioninstance. The secret is determined bySessionCreation.getSessionSecret().- Specified by:
blacklistin interfaceSessionDao- Parameters:
userId- the user ID owning the sessionsessionSecret- the session secret
-
validate
-
getValidationHelper
-
setValidationHelper
-
getMongoDBUtils
-
setMongoDBUtils
-
getDatastore
public dev.morphia.Datastore getDatastore() -
setDatastore
@Inject public void setDatastore(dev.morphia.Datastore datastore) -
getMongoUserDao
-
setMongoUserDao
-
getMessageDigestProvider
-
setMessageDigestProvider
@Inject public void setMessageDigestProvider(@Named("dev.getelements.elements.password.digest") jakarta.inject.Provider<MessageDigest> messageDigestProvider) -
getMapper
-
setMapper
-