Class User

java.lang.Object
com.netflix.spinnaker.security.User
All Implemented Interfaces:
Serializable, org.springframework.security.core.userdetails.UserDetails

@Deprecated public class User extends Object implements org.springframework.security.core.userdetails.UserDetails
Deprecated.
use org.springframework.security.core.userdetails.User and AllowedAccountsAuthorities to encode allowed accounts callers should program against UserDetails interface use runAs on AuthenticatedRequest to switch users rather than supplying a principal directly.
A UserDetails implementation to hook into Spring Security framework.

User exists to propagate the allowedAccounts.

This class is deprecated in favor of encoding allowed accounts as granted authorities, and using the spring frameworks built in User object and preferring the UserDetails interface when interacting.

See Also:
  • Field Details

    • serialVersionUID

      public static final long serialVersionUID
      Deprecated.
      See Also:
    • email

      protected String email
      Deprecated.
    • username

      protected String username
      Deprecated.
    • firstName

      protected String firstName
      Deprecated.
    • lastName

      protected String lastName
      Deprecated.
    • roles

      protected Collection<String> roles
      Deprecated.
    • allowedAccounts

      protected Collection<String> allowedAccounts
      Deprecated.
  • Constructor Details

    • User

      public User()
      Deprecated.
  • Method Details

    • getAuthorities

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

      public String getPassword()
      Deprecated.
      Not used
      Specified by:
      getPassword in interface org.springframework.security.core.userdetails.UserDetails
    • getUsername

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

      public String getEmail()
      Deprecated.
    • setEmail

      public void setEmail(String email)
      Deprecated.
    • setUsername

      public void setUsername(String username)
      Deprecated.
    • getFirstName

      public String getFirstName()
      Deprecated.
    • setFirstName

      public void setFirstName(String firstName)
      Deprecated.
    • getLastName

      public String getLastName()
      Deprecated.
    • setLastName

      public void setLastName(String lastName)
      Deprecated.
    • getRoles

      public Collection<String> getRoles()
      Deprecated.
    • setRoles

      public void setRoles(Collection<String> roles)
      Deprecated.
    • getAllowedAccounts

      public Collection<String> getAllowedAccounts()
      Deprecated.
    • setAllowedAccounts

      public void setAllowedAccounts(Collection<String> allowedAccounts)
      Deprecated.
    • asImmutable

      public User asImmutable()
      Deprecated.
    • isAccountNonExpired

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

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

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

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