Class OpenSaml4AuthenticationRequestResolver
java.lang.Object
org.springframework.security.saml2.provider.service.web.authentication.OpenSaml4AuthenticationRequestResolver
- All Implemented Interfaces:
Saml2AuthenticationRequestResolver
public final class OpenSaml4AuthenticationRequestResolver
extends Object
implements Saml2AuthenticationRequestResolver
A strategy for resolving a SAML 2.0 Authentication Request from the
HttpServletRequest
using OpenSAML.- Since:
- 5.7
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
-
Field Summary
Fields inherited from interface org.springframework.security.saml2.provider.service.web.authentication.Saml2AuthenticationRequestResolver
DEFAULT_AUTHENTICATION_REQUEST_URI
-
Constructor Summary
ConstructorDescriptionOpenSaml4AuthenticationRequestResolver
(RelyingPartyRegistrationResolver relyingPartyRegistrationResolver) Construct aOpenSaml4AuthenticationRequestResolver
-
Method Summary
Modifier and TypeMethodDescription<T extends AbstractSaml2AuthenticationRequest>
Tresolve
(jakarta.servlet.http.HttpServletRequest request) void
setAuthnRequestCustomizer
(Consumer<OpenSaml4AuthenticationRequestResolver.AuthnRequestContext> contextConsumer) Set aConsumer
for modifying the OpenSAMLAuthnRequest
void
void
setRelayStateResolver
(org.springframework.core.convert.converter.Converter<jakarta.servlet.http.HttpServletRequest, String> relayStateResolver) Use thisConverter
to compute the RelayStatevoid
setRequestMatcher
(org.springframework.security.web.util.matcher.RequestMatcher requestMatcher) Set theRequestMatcher
to use for setting theOpenSamlAuthenticationRequestResolver.setRequestMatcher(RequestMatcher)
(RequestMatcher)}
-
Constructor Details
-
OpenSaml4AuthenticationRequestResolver
public OpenSaml4AuthenticationRequestResolver(RelyingPartyRegistrationResolver relyingPartyRegistrationResolver) Construct aOpenSaml4AuthenticationRequestResolver
-
-
Method Details
-
resolve
public <T extends AbstractSaml2AuthenticationRequest> T resolve(jakarta.servlet.http.HttpServletRequest request) - Specified by:
resolve
in interfaceSaml2AuthenticationRequestResolver
-
setAuthnRequestCustomizer
public void setAuthnRequestCustomizer(Consumer<OpenSaml4AuthenticationRequestResolver.AuthnRequestContext> contextConsumer) Set aConsumer
for modifying the OpenSAMLAuthnRequest
- Parameters:
contextConsumer
- a consumer that accepts anOpenSaml4AuthenticationRequestResolver.AuthnRequestContext
-
setRequestMatcher
public void setRequestMatcher(org.springframework.security.web.util.matcher.RequestMatcher requestMatcher) Set theRequestMatcher
to use for setting theOpenSamlAuthenticationRequestResolver.setRequestMatcher(RequestMatcher)
(RequestMatcher)}- Parameters:
requestMatcher
- theRequestMatcher
to identify authentication requests.- Since:
- 5.8
-
setClock
- Parameters:
clock
- theClock
to use
-
setRelayStateResolver
public void setRelayStateResolver(org.springframework.core.convert.converter.Converter<jakarta.servlet.http.HttpServletRequest, String> relayStateResolver) Use thisConverter
to compute the RelayState- Parameters:
relayStateResolver
- theConverter
to use- Since:
- 5.8
-