Class UserAuthentication
java.lang.Object
com.erudika.para.server.security.UserAuthentication
- All Implemented Interfaces:
Serializable, Principal
- Direct Known Subclasses:
JWTAuthentication
A simple wrapper for the authentication object.
- Author:
- Alex Bogdanovski [[email protected]]
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends org.springframework.security.core.GrantedAuthority> A list of roles for the authenticated user.Always null (unused).The user details object.getName()The user identifier.The user details object.booleanChecks if the user is authenticated.voidsetAuthenticated(boolean isAuthenticated) Not supported.
-
Constructor Details
-
UserAuthentication
Default constructor.- Parameters:
principal- the user object
-
-
Method Details
-
getAuthorities
A list of roles for the authenticated user.- Returns:
- a list of roles
-
getCredentials
-
getDetails
-
getPrincipal
-
isAuthenticated
public boolean isAuthenticated()Checks if the user is authenticated.- Returns:
- true if authenticated
-
setAuthenticated
public void setAuthenticated(boolean isAuthenticated) Not supported.- Parameters:
isAuthenticated- true if authenticated
-
getName
-