Class OpenSaml4LogoutRequestValidatorParametersResolver
- All Implemented Interfaces:
Saml2LogoutRequestValidatorParametersResolver
Saml2LogoutRequestValidatorParametersResolver-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolve(jakarta.servlet.http.HttpServletRequest request, org.springframework.security.core.Authentication authentication) Construct the parameters necessary for validating an asserting party's<saml2:LogoutRequest>based on the givenHttpServletRequestvoidsetRequestMatcher(org.springframework.security.web.util.matcher.RequestMatcher requestMatcher) The request matcher to use to identify a request to process a<saml2:LogoutRequest>.
-
Constructor Details
-
OpenSaml4LogoutRequestValidatorParametersResolver
public OpenSaml4LogoutRequestValidatorParametersResolver(RelyingPartyRegistrationRepository registrations) Constructs aOpenSaml4LogoutRequestValidatorParametersResolver
-
-
Method Details
-
resolve
public Saml2LogoutRequestValidatorParameters resolve(jakarta.servlet.http.HttpServletRequest request, org.springframework.security.core.Authentication authentication) Construct the parameters necessary for validating an asserting party's<saml2:LogoutRequest>based on the givenHttpServletRequestUses the configured
RequestMatcherto identify the processing request, including looking for any indicatedregistrationId.If a
registrationIdis found in the request, it will attempt to use that, erroring if noRelyingPartyRegistrationis found.If no
registrationIdis found in the request, it will look for a currently logged-in user and use the associatedregistrationId.In the event that neither the URL nor any logged in user could determine a
registrationId, this code then will try and derive aRelyingPartyRegistrationgiven the<saml2:LogoutRequest>'sIssuervalue.- Specified by:
resolvein interfaceSaml2LogoutRequestValidatorParametersResolver- Parameters:
request- the HTTP requestauthentication- the current user, if any; may be null- Returns:
- a
Saml2LogoutRequestValidatorParametersinstance, ornullif one could not be resolved - Throws:
Saml2AuthenticationException- if theRequestMatcherspecifies a non-existentregistrationId
-
setRequestMatcher
public void setRequestMatcher(org.springframework.security.web.util.matcher.RequestMatcher requestMatcher) The request matcher to use to identify a request to process a<saml2:LogoutRequest>. By default, checks for/logout/saml2/sloand/logout/saml2/slo/{registrationId}.Generally speaking, the URL does not need to have a
registrationIdin it since either it can be looked up from the active logged in user or it can be derived through theIssuerin the<saml2:LogoutRequest>.- Parameters:
requestMatcher- theRequestMatcherto use
-