S
- the type of Session being managed by this
FindByIndexNameSessionRepository
public interface FindByIndexNameSessionRepository<S extends Session> extends SessionRepository<S>
SessionRepository
to allow finding a session id by the
principal name. The principal name is defined by the Session
attribute with the
name PRINCIPAL_NAME_INDEX_NAME
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PRINCIPAL_NAME_INDEX_NAME
A common session attribute 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 session attribute with the name
PRINCIPAL_NAME_INDEX_NAME and the value of
the specified principal name. |
createSession, delete, getSession, save
static final java.lang.String PRINCIPAL_NAME_INDEX_NAME
A common session attribute that contains the current principal name (i.e. username).
It is the responsibility of the developer to ensure the attribute 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)
Session
of all sessions that contain
the session attribute with the name
PRINCIPAL_NAME_INDEX_NAME
and the value of
the specified principal name.indexName
- the name of the index (i.e.
PRINCIPAL_NAME_INDEX_NAME
)indexValue
- the value of the index to search for.Session
of all sessions
that contain the session specified index name and the value of the specified index
name. If no results are found, an empty Map is returned.