Package io.jmix.saml.converter
Class SamlResponseAuthenticationConverter
java.lang.Object
io.jmix.saml.converter.SamlResponseAuthenticationConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.Converter<org.springframework.security.saml2.provider.service.authentication.OpenSaml5AuthenticationProvider.ResponseToken,org.springframework.security.saml2.provider.service.authentication.Saml2Authentication>
public class SamlResponseAuthenticationConverter
extends Object
implements org.springframework.core.convert.converter.Converter<org.springframework.security.saml2.provider.service.authentication.OpenSaml5AuthenticationProvider.ResponseToken,org.springframework.security.saml2.provider.service.authentication.Saml2Authentication>
Converter that converts SAML response token to
Saml2Authentication object.
It constructs JmixSamlUserDetails from SAML assertion and sets it as authentication principal.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.saml2.provider.service.authentication.Saml2Authenticationconvert(org.springframework.security.saml2.provider.service.authentication.OpenSaml5AuthenticationProvider.ResponseToken responseToken) protected @Nullable org.opensaml.saml.saml2.core.AssertiongetAssertion(org.springframework.security.saml2.provider.service.authentication.OpenSaml5AuthenticationProvider.ResponseToken responseToken) Extracts assertion from SAML response, handling both plain and encrypted assertions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.core.convert.converter.Converter
andThen
-
Field Details
-
samlUserMapper
-
-
Constructor Details
-
SamlResponseAuthenticationConverter
-
-
Method Details
-
convert
public org.springframework.security.saml2.provider.service.authentication.Saml2Authentication convert(org.springframework.security.saml2.provider.service.authentication.OpenSaml5AuthenticationProvider.ResponseToken responseToken) - Specified by:
convertin interfaceorg.springframework.core.convert.converter.Converter<org.springframework.security.saml2.provider.service.authentication.OpenSaml5AuthenticationProvider.ResponseToken,org.springframework.security.saml2.provider.service.authentication.Saml2Authentication>
-
getAssertion
protected @Nullable org.opensaml.saml.saml2.core.Assertion getAssertion(org.springframework.security.saml2.provider.service.authentication.OpenSaml5AuthenticationProvider.ResponseToken responseToken) Extracts assertion from SAML response, handling both plain and encrypted assertions.
-