Class OidcSessionInformation
java.lang.Object
org.springframework.security.core.session.SessionInformation
org.springframework.security.oauth2.client.oidc.session.OidcSessionInformation
- All Implemented Interfaces:
Serializable
A
SessionInformation
extension that enforces the principal be of type
OidcUser
.- Since:
- 6.2
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAny material needed to authorize operations on this sessionwithSessionId
(String sessionId) Copy thisOidcSessionInformation
, using a new session identifierMethods inherited from class org.springframework.security.core.session.SessionInformation
expireNow, getLastRequest, getSessionId, isExpired, refreshLastRequest
-
Constructor Details
-
OidcSessionInformation
Construct anOidcSessionInformation
- Parameters:
sessionId
- the Client's session idauthorities
- any material that authorizes operating on the sessionuser
- the OIDC Provider's session and end user
-
-
Method Details
-
getAuthorities
Any material needed to authorize operations on this session- Returns:
- the
Map
of credentials
-
getPrincipal
- Overrides:
getPrincipal
in classSessionInformation
-
withSessionId
Copy thisOidcSessionInformation
, using a new session identifier- Parameters:
sessionId
- the new session identifier to use- Returns:
- a new
OidcSessionInformation
instance
-