Package org.apache.solr.security.jwt
Class JWTPrincipalWithUserRoles
- java.lang.Object
-
- org.apache.solr.security.jwt.JWTPrincipal
-
- org.apache.solr.security.jwt.JWTPrincipalWithUserRoles
-
- All Implemented Interfaces:
Principal,VerifiedUserRoles
public class JWTPrincipalWithUserRoles extends JWTPrincipal implements VerifiedUserRoles
JWT principal that contains username, token, claims and a list of roles the user has, so one can keep track of user-role mappings in an Identity Server external to Solr and pass the information to Solr in a signed JWT token. The role information can then be used to authorize requests without the need to maintain or lookup what roles each user belongs to.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Set<String>getVerifiedRoles()Gets the list of rolesinthashCode()StringtoString()-
Methods inherited from class org.apache.solr.security.jwt.JWTPrincipal
getClaims, getName, getToken
-
-
-
-
Method Detail
-
getVerifiedRoles
public Set<String> getVerifiedRoles()
Gets the list of roles- Specified by:
getVerifiedRolesin interfaceVerifiedUserRoles
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfacePrincipal- Overrides:
equalsin classJWTPrincipal
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacePrincipal- Overrides:
hashCodein classJWTPrincipal
-
toString
public String toString()
- Specified by:
toStringin interfacePrincipal- Overrides:
toStringin classJWTPrincipal
-
-