Package org.mockserver.saml
Class SamlSsoCallback
java.lang.Object
org.mockserver.saml.SamlSsoCallback
- All Implemented Interfaces:
ExpectationCallback<HttpResponse>,ExpectationResponseCallback
Mock SAML 2.0 IdP Single-Sign-On endpoint implementing the SP-initiated Web-Browser-SSO POST
profile.
There is no login UI — the mock authenticates the configured subject deterministically. It
builds a freshly signed SAML <Response> (see SamlResponseBuilder), base64-encodes
it, and returns a self-submitting HTML form that POSTs the SAMLResponse (and the echoed
RelayState, if supplied) to the SP's assertion consumer service URL.
The RelayState and SAMLRequest are read from either the query string (HTTP-GET)
or the application/x-www-form-urlencoded body (HTTP-POST), so both bindings of the initial
SP redirect are accepted.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandle(HttpRequest request) Called for every request when expectation condition has been satisfied.
-
Constructor Details
-
SamlSsoCallback
public SamlSsoCallback()
-
-
Method Details
-
handle
Description copied from interface:ExpectationResponseCallbackCalled for every request when expectation condition has been satisfied. The request that satisfied the expectation condition is passed as the parameter and the return value is the request that will be returned.- Specified by:
handlein interfaceExpectationCallback<HttpResponse>- Specified by:
handlein interfaceExpectationResponseCallback- Parameters:
request- the request that satisfied the expectation condition- Returns:
- the response that will be returned
-