Class UserDetailsOAuth2AuthenticatedPrincipal

java.lang.Object
io.jmix.authserver.introspection.UserDetailsOAuth2AuthenticatedPrincipal
All Implemented Interfaces:
AcceptsGrantedAuthorities, JmixUserDetails, Serializable, org.springframework.security.core.AuthenticatedPrincipal, org.springframework.security.core.userdetails.UserDetails, org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal

public class UserDetailsOAuth2AuthenticatedPrincipal extends Object implements org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal, JmixUserDetails
Instances of this class are set as authentication principal to the security context when resource server API are accessed
See Also:
  • Field Details

    • attributes

      protected Map<String,Object> attributes
    • authorities

      protected Collection<? extends org.springframework.security.core.GrantedAuthority> authorities
    • username

      protected String username
  • Constructor Details

    • UserDetailsOAuth2AuthenticatedPrincipal

      public UserDetailsOAuth2AuthenticatedPrincipal(String username, Map<String,Object> attributes, Collection<org.springframework.security.core.GrantedAuthority> authorities)
  • Method Details

    • setAuthorities

      public void setAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
      Specified by:
      setAuthorities in interface AcceptsGrantedAuthorities
    • getPassword

      @Nullable public String getPassword()
      Specified by:
      getPassword in interface org.springframework.security.core.userdetails.UserDetails
    • getUsername

      public String getUsername()
      Specified by:
      getUsername in interface org.springframework.security.core.userdetails.UserDetails
    • isAccountNonExpired

      public boolean isAccountNonExpired()
      Specified by:
      isAccountNonExpired in interface org.springframework.security.core.userdetails.UserDetails
    • isAccountNonLocked

      public boolean isAccountNonLocked()
      Specified by:
      isAccountNonLocked in interface org.springframework.security.core.userdetails.UserDetails
    • isCredentialsNonExpired

      public boolean isCredentialsNonExpired()
      Specified by:
      isCredentialsNonExpired in interface org.springframework.security.core.userdetails.UserDetails
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface org.springframework.security.core.userdetails.UserDetails
    • getAttributes

      public Map<String,Object> getAttributes()
      Specified by:
      getAttributes in interface org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
    • getAuthorities

      public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
      Specified by:
      getAuthorities in interface org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal
      Specified by:
      getAuthorities in interface org.springframework.security.core.userdetails.UserDetails
    • getName

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