Class MongoSessionDao
java.lang.Object
dev.getelements.elements.dao.mongo.MongoSessionDao
- All Implemented Interfaces:
SessionDao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes theSession
instance.getBySessionSecret
(String sessionSecret) Gets theSession
by it's session id, as returned bySessionCreation.getSessionSecret()
()}.dev.morphia.Datastore
jakarta.inject.Provider
<MessageDigest> Refreshs theSession
with the supplied expiry.void
setDatastore
(dev.morphia.Datastore datastore) void
setMapper
(MapperRegistry mapperRegistry) void
setMessageDigestProvider
(jakarta.inject.Provider<MessageDigest> messageDigestProvider) void
setMongoDBUtils
(MongoDBUtils mongoDBUtils) void
setMongoUserDao
(MongoUserDao mongoUserDao) void
setValidationHelper
(ValidationHelper validationHelper) void
-
Constructor Details
-
MongoSessionDao
public MongoSessionDao()
-
-
Method Details
-
getBySessionSecret
Description copied from interface:SessionDao
Gets theSession
by it's session id, as returned bySessionCreation.getSessionSecret()
()}. Throwing an appropriate exception type if theSession
can't be found.- Specified by:
getBySessionSecret
in interfaceSessionDao
- Parameters:
sessionSecret
- the session's ID- Returns:
- the
Session
never null
-
refresh
Description copied from interface:SessionDao
Refreshs theSession
with the supplied expiry.- Specified by:
refresh
in 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:SessionDao
Creates aSession
with the providedSession
object. This will return an instance ofSessionCreation
providing a secret key which can be used to access theSession
in the future.- Specified by:
create
in interfaceSessionDao
- Parameters:
session
-- Returns:
- the
SessionCreation
as it was created in the database
-
blacklist
Description copied from interface:SessionDao
Deletes theSession
instance. The secret is determined bySessionCreation.getSessionSecret()
.- Specified by:
blacklist
in 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
-