Package org.imixs.security.oidc
Class TokenValidator
java.lang.Object
org.imixs.security.oidc.TokenValidator
The TokenValidator is used to validate OIDC access tokens against the
identity provider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic jakarta.json.JsonObjectdecodeJwtPayload(String jwt) extractRoles(jakarta.json.JsonObject claims, String claimPath) This method extracts the roles form a given json path.static StringextractUsername(jakarta.json.JsonObject claims, String claimCallerName) This method extract the caller name from the claim object.static booleanisTokenValid(String jwt, Map<String, com.nimbusds.jose.jwk.RSAKey> publicKeys)
-
Constructor Details
-
TokenValidator
public TokenValidator()
-
-
Method Details
-
decodeJwtPayload
- Throws:
Exception
-
isTokenValid
-
extractUsername
This method extract the caller name from the claim object. If not provided the method will default to preferred_username|sub|name- Parameters:
claims-claimCallerName-- Returns:
-
extractRoles
This method extracts the roles form a given json path. If no path is provided, the method automatically tries to extract the roles based on default locations within the claims.- Parameters:
claims-claimPath-- Returns:
-