Class JmixSamlUserEntity

java.lang.Object
io.jmix.saml.user.JmixSamlUserEntity
All Implemented Interfaces:
HasSamlPrincipalDelegate, JmixSamlUserDetails, AcceptsGrantedAuthorities, JmixUserDetails, Serializable, org.springframework.security.core.AuthenticatedPrincipal, org.springframework.security.core.userdetails.UserDetails, org.springframework.security.saml2.provider.service.authentication.Saml2AuthenticatedPrincipal

@MappedSuperclass public abstract class JmixSamlUserEntity extends Object implements JmixSamlUserDetails, HasSamlPrincipalDelegate
Mapped superclass to be extended by JPA entity that stores user information. Extend the User entity class generated by Jmix Studio to make it work with jmix-saml add-on.

The SAML principal delegate is set only during SAML authentication. Entity instances obtained through other paths (system authentication, user substitution, UI views, user repository lookups) have no delegate, so the delegating methods fall back to neutral values instead of failing.

See Also:
  • Constructor Details

    • JmixSamlUserEntity

      public JmixSamlUserEntity()
  • Method Details

    • getDelegate

      public org.springframework.security.saml2.provider.service.authentication.Saml2AuthenticatedPrincipal getDelegate()
      Specified by:
      getDelegate in interface HasSamlPrincipalDelegate
    • setDelegate

      public void setDelegate(org.springframework.security.saml2.provider.service.authentication.Saml2AuthenticatedPrincipal delegate)
      Specified by:
      setDelegate in interface HasSamlPrincipalDelegate
    • getName

      public String getName()
      Specified by:
      getName in interface org.springframework.security.core.AuthenticatedPrincipal
    • getFirstAttribute

      public <A> @Nullable A getFirstAttribute(String name)
      Specified by:
      getFirstAttribute in interface org.springframework.security.saml2.provider.service.authentication.Saml2AuthenticatedPrincipal
    • getAttribute

      public <A> @Nullable List<A> getAttribute(String name)
      Specified by:
      getAttribute in interface org.springframework.security.saml2.provider.service.authentication.Saml2AuthenticatedPrincipal
    • getAttributes

      public Map<String,List<Object>> getAttributes()
      Specified by:
      getAttributes in interface org.springframework.security.saml2.provider.service.authentication.Saml2AuthenticatedPrincipal
    • getRelyingPartyRegistrationId

      public @Nullable String getRelyingPartyRegistrationId()
      Specified by:
      getRelyingPartyRegistrationId in interface org.springframework.security.saml2.provider.service.authentication.Saml2AuthenticatedPrincipal
    • getSessionIndexes

      public List<String> getSessionIndexes()
      Specified by:
      getSessionIndexes in interface org.springframework.security.saml2.provider.service.authentication.Saml2AuthenticatedPrincipal