Package org.apache.solr.security.jwt
Class JWTPrincipal
- java.lang.Object
-
- org.apache.solr.security.jwt.JWTPrincipal
-
- All Implemented Interfaces:
Principal
- Direct Known Subclasses:
JWTPrincipalWithUserRoles
public class JWTPrincipal extends Object implements Principal
Principal object that carries JWT token and claims for authenticated user.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Map<String,Object>
getClaims()
String
getName()
String
getToken()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
JWTPrincipal
public JWTPrincipal(String username, String token, Map<String,Object> claims)
User principal with user name as well as one or more roles that he/she belong to- Parameters:
username
- string with user name for usertoken
- compact string representation of JWT tokenclaims
- list of verified JWT claims as a map
-
-