Interface SecurityActor

All Known Implementing Classes:
AuthenticatedToken

public interface SecurityActor
Base interface for other authenticated detail interfaces to extend.
Since:
3.4
Version:
1.0
Author:
matt
  • Method Details

    • isAuthenticatedWithToken

      boolean isAuthenticatedWithToken()
      Return true if the actor authenticated via a token.
      Returns:
      boolean
    • getSecurityToken

      SecurityToken getSecurityToken()
      Get the token.
      Returns:
      the token, or null if not authenticated with a token
    • getCurrentAuthentication

      static org.springframework.security.core.Authentication getCurrentAuthentication()
      Get the current active authentication.
      Returns:
      the active Authentication, or null if none available
    • getCurrentActor

      static SecurityActor getCurrentActor() throws net.solarnetwork.security.SecurityException
      Get the current SecurityActor.
      Returns:
      the current actor, never null
      Throws:
      net.solarnetwork.security.SecurityException - if the actor is not available