Class DefaultRoleUserDetailsServiceDecorator.DefaultRoleUserDetailsProxy

  • All Implemented Interfaces:
    Serializable, org.springframework.security.core.userdetails.UserDetails
    Enclosing class:
    DefaultRoleUserDetailsServiceDecorator

    public static class DefaultRoleUserDetailsServiceDecorator.DefaultRoleUserDetailsProxy
    extends Object
    implements org.springframework.security.core.userdetails.UserDetails
    A UserDetails that has an extra role. The extra role is added to the end of the original role list and only if it is not already in the original role list.
    Author:
    mlowery
    See Also:
    Serialized Form
    • Constructor Detail

      • DefaultRoleUserDetailsProxy

        public DefaultRoleUserDetailsProxy​(org.springframework.security.core.userdetails.UserDetails userDetails,
                                           org.springframework.security.core.GrantedAuthority defaultRole)
      • DefaultRoleUserDetailsProxy

        public DefaultRoleUserDetailsProxy​(org.springframework.security.core.userdetails.UserDetails userDetails,
                                           org.springframework.security.core.GrantedAuthority defaultRole,
                                           org.pentaho.platform.api.engine.security.IAuthenticationRoleMapper roleMapper)
    • Method Detail

      • getNewRoles

        protected Collection<? extends org.springframework.security.core.GrantedAuthority> getNewRoles​(org.springframework.security.core.GrantedAuthority defaultRole)
        Since UserDetails is immutable, we can safely pre-calculate the new roles.
      • getAuthorities

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

        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