Package net.solarnetwork.node.domain
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 Summary
Modifier and TypeMethodDescriptionstatic SecurityActorGet the currentSecurityActor.static org.springframework.security.core.AuthenticationGet the current active authentication.Get the token.booleanReturntrueif the actor authenticated via a token.
-
Method Details
-
isAuthenticatedWithToken
boolean isAuthenticatedWithToken()Returntrueif 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
Get the currentSecurityActor.- Returns:
- the current actor, never null
- Throws:
net.solarnetwork.security.SecurityException- if the actor is not available
-