Package org.apache.solr.security
Class JWTPrincipalWithUserRoles
- java.lang.Object
-
- org.apache.solr.security.JWTPrincipal
-
- org.apache.solr.security.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 boolean
equals(Object o)
Set<String>
getVerifiedRoles()
Gets the list of rolesint
hashCode()
String
toString()
-
Methods inherited from class org.apache.solr.security.JWTPrincipal
getClaims, getName, getToken
-
-
-
-
Method Detail
-
getVerifiedRoles
public Set<String> getVerifiedRoles()
Gets the list of roles- Specified by:
getVerifiedRoles
in interfaceVerifiedUserRoles
-
equals
public boolean equals(Object o)
- Specified by:
equals
in interfacePrincipal
- Overrides:
equals
in classJWTPrincipal
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacePrincipal
- Overrides:
hashCode
in classJWTPrincipal
-
toString
public String toString()
- Specified by:
toString
in interfacePrincipal
- Overrides:
toString
in classJWTPrincipal
-
-