S - the type of Session being managed by this
FindByIndexNameSessionRepositorypublic interface FindByIndexNameSessionRepository<S extends Session> extends SessionRepository<S>
SessionRepository to allow finding sessions by the specified
index name and index value.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PRINCIPAL_NAME_INDEX_NAME
A session index that contains the current principal name (i.e.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,S> |
findByIndexNameAndIndexValue(java.lang.String indexName,
java.lang.String indexValue)
Find a
Map of the session id to the Session of all sessions that
contain the specified index name index value. |
default java.util.Map<java.lang.String,S> |
findByPrincipalName(java.lang.String principalName)
Find a
Map of the session id to the Session of all sessions that
contain the index with the name
PRINCIPAL_NAME_INDEX_NAME and the
specified principal name. |
createSession, deleteById, findById, savestatic final java.lang.String PRINCIPAL_NAME_INDEX_NAME
It is the responsibility of the developer to ensure the index is populated since Spring Session is not aware of the authentication mechanism being used.
java.util.Map<java.lang.String,S> findByIndexNameAndIndexValue(java.lang.String indexName, java.lang.String indexValue)
Map of the session id to the Session of all sessions that
contain the specified index name index value.indexName - the name of the index (i.e.
PRINCIPAL_NAME_INDEX_NAME)indexValue - the value of the index to search for.Map (never null) of the session id to the Session
of all sessions that contain the specified index name and index value. If no
results are found, an empty Map is returned.default java.util.Map<java.lang.String,S> findByPrincipalName(java.lang.String principalName)
Map of the session id to the Session of all sessions that
contain the index with the name
PRINCIPAL_NAME_INDEX_NAME and the
specified principal name.principalName - the principal nameMap (never null) of the session id to the Session
of all sessions that contain the specified principal name. If no results are found,
an empty Map is returned.