Class DetailedSaml2Authentication

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.saml2.provider.service.authentication.Saml2Authentication
se.swedenconnect.spring.saml.testsp.ext.DetailedSaml2Authentication
All Implemented Interfaces:
Serializable, Principal, org.springframework.security.core.Authentication, org.springframework.security.core.CredentialsContainer

public class DetailedSaml2Authentication extends org.springframework.security.saml2.provider.service.authentication.Saml2Authentication
Extends Saml2Authentication with information about the issued assertion.

The Spring Security developers did not think things through. The response is assigned to Saml2Authentication, but if encrypted assertions are being passed, we have little use of the response. Therefore, we assign the (decrypted) SAML Assertion in our detailed Saml2Authentication object.

Author:
Martin Lindström
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    DetailedSaml2Authentication(org.springframework.security.core.AuthenticatedPrincipal principal, String saml2Response, Assertion assertion, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     

    Methods inherited from class org.springframework.security.saml2.provider.service.authentication.Saml2Authentication

    getCredentials, getPrincipal, getSaml2Response

    Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

    equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.security.Principal

    implies
  • Constructor Details

    • DetailedSaml2Authentication

      public DetailedSaml2Authentication(org.springframework.security.core.AuthenticatedPrincipal principal, String saml2Response, Assertion assertion, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
  • Method Details

    • getAssertion

      public Assertion getAssertion()