Package org.apache.solr.security
Class JWTPrincipal
- java.lang.Object
-
- org.apache.solr.security.JWTPrincipal
-
- All Implemented Interfaces:
Serializable
,Principal
- Direct Known Subclasses:
JWTPrincipalWithUserRoles
public class JWTPrincipal extends Object implements Principal, Serializable
Principal object that carries JWT token and claims for authenticated user.- See Also:
- Serialized Form
-
-
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
-
-