Class Saml2IdpEventPublisher
java.lang.Object
se.swedenconnect.spring.saml.idp.events.Saml2IdpEventPublisher
A publisher for SAML IdP events.
- Author:
- Martin Lindström
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Publishes aSaml2AuthnRequestReceivedEvent
indicating that a SAMLAuthnRequest
was received.void
Publishes aSaml2PreUserAuthenticationEvent
.void
publishSamlErrorResponse
(org.opensaml.saml.saml2.core.Response response, String entityId) Publishes aSaml2ErrorResponseEvent
indicating that a SAML error response is about to be sent.void
publishSamlSuccessResponse
(org.opensaml.saml.saml2.core.Response response, org.opensaml.saml.saml2.core.Assertion assertion, String spEntityId) Publishes aSaml2SuccessResponseEvent
indicating that a successful SAML response is about to be sent.void
Publishes aSaml2UnrecoverableErrorEvent
indicating that anUnrecoverableSaml2IdpException
has been thrown.void
Publishes aSaml2PostUserAuthenticationEvent
indicating that anUserAuthenticationProvider
has authenticated the user.
-
Constructor Details
-
Saml2IdpEventPublisher
Constructor.- Parameters:
publisher
- the system's event publisher
-
-
Method Details
-
publishAuthnRequestReceived
Publishes aSaml2AuthnRequestReceivedEvent
indicating that a SAMLAuthnRequest
was received.- Parameters:
token
- theSaml2AuthnRequestAuthenticationToken
-
publishSamlSuccessResponse
public void publishSamlSuccessResponse(org.opensaml.saml.saml2.core.Response response, org.opensaml.saml.saml2.core.Assertion assertion, String spEntityId) Publishes aSaml2SuccessResponseEvent
indicating that a successful SAML response is about to be sent.- Parameters:
response
- the SAML responseassertion
- the SAML Assertion (before being encrypted)spEntityId
- the entityID of the SP that we are sending the response to
-
publishSamlErrorResponse
public void publishSamlErrorResponse(org.opensaml.saml.saml2.core.Response response, String entityId) Publishes aSaml2ErrorResponseEvent
indicating that a SAML error response is about to be sent.- Parameters:
response
- the SAMLResponse
entityId
- the SAML entityID of the recipient
-
publishBeforeUserAuthenticated
Publishes aSaml2PreUserAuthenticationEvent
. This is fired before the user is authenticated but after all the input SAML processing has been performed.- Parameters:
token
- aSaml2UserAuthenticationInputToken
token
-
publishUserAuthenticated
Publishes aSaml2PostUserAuthenticationEvent
indicating that anUserAuthenticationProvider
has authenticated the user.- Parameters:
authn
- theSaml2UserAuthentication
-
publishUnrecoverableSamlError
Publishes aSaml2UnrecoverableErrorEvent
indicating that anUnrecoverableSaml2IdpException
has been thrown.- Parameters:
error
- theUnrecoverableSaml2IdpException
error
-