Class DefaultSamlUserMapper

All Implemented Interfaces:
SamlUserMapper<DefaultJmixSamlUserDetails>

@NullMarked public class DefaultSamlUserMapper extends BaseSamlUserMapper<DefaultJmixSamlUserDetails>
Default implementation of SamlUserMapper that converts SAML assertion into DefaultJmixSamlUserDetails.
  • Field Details

  • Constructor Details

    • DefaultSamlUserMapper

      public DefaultSamlUserMapper()
  • Method Details

    • initJmixUser

      protected DefaultJmixSamlUserDetails initJmixUser(org.opensaml.saml.saml2.core.Assertion assertion)
      Description copied from class: BaseSamlUserMapper
      Returns an instance of Jmix user, which may be either a new instance or an instance loaded from the user repository. Attributes and authorities will lately be filled in other methods. The responsibility of the current method is just to create or load an existing instance.
      Specified by:
      initJmixUser in class BaseSamlUserMapper<DefaultJmixSamlUserDetails>
      Parameters:
      assertion - SAML assertion
      Returns:
      new Jmix user instance or Jmix user loaded from user repository
    • populateUserAttributes

      protected void populateUserAttributes(org.opensaml.saml.saml2.core.Assertion assertion, org.springframework.security.saml2.provider.service.authentication.OpenSaml5AuthenticationProvider.ResponseToken responseToken, DefaultJmixSamlUserDetails jmixUser)
      Description copied from class: BaseSamlUserMapper
      Fills attributes of jmixUser based on information from the assertion
      Specified by:
      populateUserAttributes in class BaseSamlUserMapper<DefaultJmixSamlUserDetails>
      Parameters:
      assertion - SAML assertion
      responseToken - the object that stores information about the authentication response from SAML provider
      jmixUser - Jmix user instance
    • populateUserAuthorities

      protected void populateUserAuthorities(org.opensaml.saml.saml2.core.Assertion assertion, DefaultJmixSamlUserDetails jmixUser)
      Description copied from class: BaseSamlUserMapper
      Fills authorities of jmixUser based on information from the assertion
      Specified by:
      populateUserAuthorities in class BaseSamlUserMapper<DefaultJmixSamlUserDetails>
      Parameters:
      assertion - SAML assertion
      jmixUser - Jmix user instance