Package org.springframework.session
Interface ReactiveFindByIndexNameSessionRepository<S extends Session>
- Type Parameters:
S
- the type of Session being managed by thisReactiveFindByIndexNameSessionRepository
- All Known Implementing Classes:
ReactiveRedisIndexedSessionRepository
public interface ReactiveFindByIndexNameSessionRepository<S extends Session>
Allow finding sessions by the specified index name and index value.
- Since:
- 3.3
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
A session index that contains the current principal name (i.e. -
Method Summary
Modifier and TypeMethodDescriptionfindByIndexNameAndIndexValue
(String indexName, String indexValue) findByPrincipalName
(String principalName) A shortcut forfindByIndexNameAndIndexValue(String, String)
that usesPRINCIPAL_NAME_INDEX_NAME
for the index name.
-
Field Details
-
PRINCIPAL_NAME_INDEX_NAME
A session index that contains the current principal name (i.e. username).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.
- See Also:
-
-
Method Details
-
findByIndexNameAndIndexValue
reactor.core.publisher.Mono<Map<String,S>> findByIndexNameAndIndexValue(String indexName, String indexValue) Find aMap
of the session id to theSession
of all sessions that contain the specified index name index value.- Parameters:
indexName
- the name of the index (i.e.PRINCIPAL_NAME_INDEX_NAME
)indexValue
- the value of the index to search for.- Returns:
- a
Map
(nevernull
) of the session id to theSession
-
findByPrincipalName
A shortcut forfindByIndexNameAndIndexValue(String, String)
that usesPRINCIPAL_NAME_INDEX_NAME
for the index name.- Parameters:
principalName
- the principal name- Returns:
- a
Map
(nevernull
) of the session id to theSession
-