Class OpenSaml5AuthenticationRequestResolver

java.lang.Object
swiss.trustbroker.oidc.opensaml5.OpenSaml5AuthenticationRequestResolver
All Implemented Interfaces:
org.springframework.security.saml2.provider.service.web.authentication.Saml2AuthenticationRequestResolver

public final class OpenSaml5AuthenticationRequestResolver extends Object implements org.springframework.security.saml2.provider.service.web.authentication.Saml2AuthenticationRequestResolver
A strategy for resolving a SAML 2.0 Authentication Request from the HttpServletRequest using OpenSAML.
Since:
5.7
  • Constructor Details

    • OpenSaml5AuthenticationRequestResolver

      public OpenSaml5AuthenticationRequestResolver(org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository registrations)
      Parameters:
      registrations - a repository for relying and asserting party configuration
      Since:
      6.1
    • OpenSaml5AuthenticationRequestResolver

      public OpenSaml5AuthenticationRequestResolver(org.springframework.security.saml2.provider.service.web.RelyingPartyRegistrationResolver relyingPartyRegistrationResolver)
  • Method Details

    • resolve

      public <T extends org.springframework.security.saml2.provider.service.authentication.AbstractSaml2AuthenticationRequest> T resolve(jakarta.servlet.http.HttpServletRequest request)
      Specified by:
      resolve in interface org.springframework.security.saml2.provider.service.web.authentication.Saml2AuthenticationRequestResolver
    • setAuthnRequestCustomizer

      public void setAuthnRequestCustomizer(Consumer<OpenSaml5AuthenticationRequestResolver.AuthnRequestContext> contextConsumer)
      Set a Consumer for modifying the OpenSAML AuthnRequest
      Parameters:
      contextConsumer - a consumer that accepts an OpenSaml5AuthenticationRequestResolver.AuthnRequestContext
    • setRequestMatcher

      public void setRequestMatcher(org.springframework.security.web.util.matcher.RequestMatcher requestMatcher)
      Set the RequestMatcher to use for setting the OpenSamlAuthenticationRequestResolver.setRequestMatcher(RequestMatcher) (RequestMatcher)}
      Parameters:
      requestMatcher - the RequestMatcher to identify authentication requests.
      Since:
      5.8
    • setClock

      public void setClock(Clock clock)
      Use this Clock for generating the issued Instant
      Parameters:
      clock - the Clock to use
    • setRelayStateResolver

      public void setRelayStateResolver(org.springframework.core.convert.converter.Converter<jakarta.servlet.http.HttpServletRequest,String> relayStateResolver)
      Use this Converter to compute the RelayState
      Parameters:
      relayStateResolver - the Converter to use
      Since:
      5.8