Class Saml2AuthnRequestAuthenticationConverter
java.lang.Object
se.swedenconnect.spring.saml.idp.authnrequest.Saml2AuthnRequestAuthenticationConverter
- All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationConverter
public class Saml2AuthnRequestAuthenticationConverter
extends Object
implements org.springframework.security.web.authentication.AuthenticationConverter
An
AuthenticationConverter
responsible for decoding a SAML authentication request and checking that it is
correct. It will produce an Saml2AuthnRequestAuthenticationToken
.- Author:
- Martin Lindström
-
Constructor Summary
ConstructorDescriptionSaml2AuthnRequestAuthenticationConverter
(org.opensaml.saml.metadata.resolver.MetadataResolver metadataResolver, IdentityProviderSettings settings) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authentication
convert
(jakarta.servlet.http.HttpServletRequest request) protected org.opensaml.saml.common.binding.decoding.SAMLMessageDecoder
getDecoder
(jakarta.servlet.http.HttpServletRequest request) Gets a decoder bean suitable for the given binding.
-
Constructor Details
-
Saml2AuthnRequestAuthenticationConverter
public Saml2AuthnRequestAuthenticationConverter(org.opensaml.saml.metadata.resolver.MetadataResolver metadataResolver, IdentityProviderSettings settings) Constructor.- Parameters:
metadataResolver
- the metadata resolver that we use when finding SP metadatasettings
- the IdP settings
-
-
Method Details
-
convert
public org.springframework.security.core.Authentication convert(jakarta.servlet.http.HttpServletRequest request) - Specified by:
convert
in interfaceorg.springframework.security.web.authentication.AuthenticationConverter
-
getDecoder
protected org.opensaml.saml.common.binding.decoding.SAMLMessageDecoder getDecoder(jakarta.servlet.http.HttpServletRequest request) Gets a decoder bean suitable for the given binding.- Returns:
- a SAMLMessageDecoder bean
-