Class AuthenticatedUser

java.lang.Object
org.springframework.security.core.userdetails.User
net.solarnetwork.central.security.AuthenticatedUser
All Implemented Interfaces:
Serializable, UserIdRelated, SecurityActor, SecurityUser, org.springframework.security.core.CredentialsContainer, org.springframework.security.core.userdetails.UserDetails

public class AuthenticatedUser extends org.springframework.security.core.userdetails.User implements SecurityUser
Extension of Spring Security's User object to add SolarNetwork attributes.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.security.core.userdetails.User

    org.springframework.security.core.userdetails.User.UserBuilder
  • Constructor Summary

    Constructors
    Constructor
    Description
    AuthenticatedUser(org.springframework.security.core.userdetails.User user, Long userId, String name, boolean authenticatedWithToken)
    Construct from existing User and details.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get a friendly display name.
    Get the email used to authenticate the user with.
     
    Get a unique user ID.
    boolean
    Return true if the actor authenticated via a token.

    Methods inherited from class org.springframework.security.core.userdetails.User

    builder, equals, eraseCredentials, getAuthorities, getPassword, getUsername, hashCode, isAccountNonExpired, isAccountNonLocked, isCredentialsNonExpired, isEnabled, toString, withDefaultPasswordEncoder, withUserDetails, withUsername

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AuthenticatedUser

      public AuthenticatedUser(org.springframework.security.core.userdetails.User user, Long userId, String name, boolean authenticatedWithToken)
      Construct from existing User and details.
      Parameters:
      user - the user
      userId - the user ID
      name - the name
      authenticatedWithToken - the authenticated with token flag
  • Method Details