Class OidcSessionInformation

java.lang.Object
org.springframework.security.core.session.SessionInformation
org.springframework.security.oauth2.client.oidc.session.OidcSessionInformation
All Implemented Interfaces:
Serializable

public class OidcSessionInformation extends org.springframework.security.core.session.SessionInformation
A SessionInformation extension that enforces the principal be of type OidcUser.
Since:
6.2
See Also:
  • Constructor Details

    • OidcSessionInformation

      public OidcSessionInformation(String sessionId, Map<String,String> authorities, org.springframework.security.oauth2.core.oidc.user.OidcUser user)
      Parameters:
      sessionId - the Client's session id
      authorities - any material that authorizes operating on the session
      user - the OIDC Provider's session and end user
  • Method Details

    • getAuthorities

      public Map<String,String> getAuthorities()
      Any material needed to authorize operations on this session
      Returns:
      the Map of credentials
    • getPrincipal

      public org.springframework.security.oauth2.core.oidc.user.OidcUser getPrincipal()
      Overrides:
      getPrincipal in class org.springframework.security.core.session.SessionInformation
    • withSessionId

      public OidcSessionInformation withSessionId(String sessionId)
      Copy this OidcSessionInformation, using a new session identifier
      Parameters:
      sessionId - the new session identifier to use
      Returns:
      a new OidcSessionInformation instance