Class AuthenticatedToken

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

public class AuthenticatedToken extends org.springframework.security.core.userdetails.User implements SecurityActor
SecurityActor implementation for authenticated tokens.
Since:
3.4
Version:
1.0
Author:
matt
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
    Construct with values.
    AuthenticatedToken(SecurityToken token, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
    Construct with values.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get 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, toString, withDefaultPasswordEncoder, withUserDetails, withUsername

    Methods inherited from class java.lang.Object

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

    • AuthenticatedToken

      public AuthenticatedToken(SecurityToken token, String... roles)
      Construct with values.
      Parameters:
      token - the token
      roles - the granted roles
      Throws:
      IllegalArgumentException - if any argument is null or empty
    • AuthenticatedToken

      public AuthenticatedToken(SecurityToken token, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
      Construct with values.
      Parameters:
      token - the token
      authorities - the granted authorities
      Throws:
      IllegalArgumentException - if any argument is null
  • Method Details