Class AuthenticatedToken

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

public class AuthenticatedToken extends org.springframework.security.core.userdetails.User implements SecurityToken
SecurityUser implementation for authenticated tokens.
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
    AuthenticatedToken(org.springframework.security.core.userdetails.UserDetails user, SecurityTokenType tokenType, Long userId, SecurityPolicy policy)
    Construct with values.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get an optional security policy.
    Get the token value.
    Get the type of token.
    Get a unique user ID that owns the token.
    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, withDefaultPasswordEncoder, withUserDetails, withUsername

    Methods inherited from class java.lang.Object

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

    • AuthenticatedToken

      public AuthenticatedToken(org.springframework.security.core.userdetails.UserDetails user, SecurityTokenType tokenType, Long userId, SecurityPolicy policy)
      Construct with values.
      Parameters:
      user - the user details
      tokenType - the token type
      userId - the user ID (that the token belongs to)
      policy - optional policy associated with the token
      Throws:
      IllegalArgumentException - if any argument other than policy is null
  • Method Details