SessionIdGenerator

Interface allowing pluggable session ID generation strategies to be used with various {@link SessionDAO} implementations. <h2>Usage</h2> SessionIdGenerators are usually only used when ID generation is separate from creating the Session record in the EIS data store. Some EIS data stores, such as relational databases, can generate the id at the same time the record is created, such as when using auto-generated primary keys. In these cases, a SessionIdGenerator does not need to be configured. <p/> However, if you want to customize how session IDs are created before persisting the Session record into the data store, you can implement this interface and typically inject it into an {@link AbstractSessionDAO} instance.

@see hunt.shiro.session.mgt.eis.JavaUuidSessionIdGenerator JavaUuidSessionIdGenerator @see hunt.shiro.session.mgt.eis.RandomSessionIdGenerator RandomSessionIdGenerator

interface SessionIdGenerator {}

Members

Functions

generateId
string generateId(Session session)

Generates a new ID to be applied to the specified {@code Session} instance.

Meta