Package com.linecorp.armeria.server.saml
Interface SamlSingleSignOnHandler
public interface SamlSingleSignOnHandler
Callbacks which are invoked to handle SAML messages exchanging with an identity provider.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault CompletionStage
<Void> beforeInitiatingSso
(ServiceRequestContext ctx, HttpRequest req, org.opensaml.messaging.context.MessageContext<org.opensaml.saml.saml2.core.AuthnRequest> message, SamlIdentityProviderConfig idpConfig) Invoked before the service provider sends an authentication request to an identity provider.loginFailed
(ServiceRequestContext ctx, AggregatedHttpRequest req, @Nullable org.opensaml.messaging.context.MessageContext<org.opensaml.saml.saml2.core.Response> message, Throwable cause) Invoked when the single sign-on is failed.loginSucceeded
(ServiceRequestContext ctx, AggregatedHttpRequest req, org.opensaml.messaging.context.MessageContext<org.opensaml.saml.saml2.core.Response> message, @Nullable String sessionIndex, @Nullable String relayState) Invoked when the single sign-on is succeeded.
-
Method Details
-
beforeInitiatingSso
default CompletionStage<Void> beforeInitiatingSso(ServiceRequestContext ctx, HttpRequest req, org.opensaml.messaging.context.MessageContext<org.opensaml.saml.saml2.core.AuthnRequest> message, SamlIdentityProviderConfig idpConfig) Invoked before the service provider sends an authentication request to an identity provider.- Parameters:
ctx
- theServiceRequestContext
ofreq
req
- theRequest
being handledmessage
- theMessageContext
of theAuthnRequest
being sent to the identity provideridpConfig
- the configuration of the identity provider that the request is sending to
-
loginSucceeded
@CheckReturnValue HttpResponse loginSucceeded(ServiceRequestContext ctx, AggregatedHttpRequest req, org.opensaml.messaging.context.MessageContext<org.opensaml.saml.saml2.core.Response> message, @Nullable @Nullable String sessionIndex, @Nullable @Nullable String relayState) Invoked when the single sign-on is succeeded. It should return anHttpResponse
which sends to the client in response to the incomingreq
.- Parameters:
ctx
- theServiceRequestContext
ofreq
req
- theAggregatedHttpRequest
being handledmessage
- theMessageContext
of theResponse
received from the identity providersessionIndex
- the retrieved value from theResponse
message.null
if it is omitted.relayState
- the string which is sent with theAuthnRequest
message and is returned with theResponse
message.null
if it is omitted.
-
loginFailed
@CheckReturnValue HttpResponse loginFailed(ServiceRequestContext ctx, AggregatedHttpRequest req, @Nullable @Nullable org.opensaml.messaging.context.MessageContext<org.opensaml.saml.saml2.core.Response> message, Throwable cause) Invoked when the single sign-on is failed. It should return anHttpResponse
which sends to the client in response to the incomingreq
. Sending an error HTML page is one of the examples.- Parameters:
ctx
- theServiceRequestContext
ofreq
req
- theAggregatedHttpRequest
being handledmessage
- theMessageContext
of theResponse
received from the identity provider.null
if the content of thereq
was failed to be parsed as aResponse
message.cause
- the reason of the failure
-