Package io.strimzi.kafka.oauth.common
Class TokenIntrospection
java.lang.Object
io.strimzi.kafka.oauth.common.TokenIntrospection
A class with methods for introspecting a JWT token
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddebugLogJWT(org.slf4j.Logger log, String token) Debug log the given raw token by parsing it as JWT and logging its payload sectionstatic TokenInfointrospectAccessToken(String token, PrincipalExtractor principalExtractor) Parse a raw access token, and extract the basic information from it, including user id by using a givenPrincipalExtractor.
-
Constructor Details
-
TokenIntrospection
public TokenIntrospection()
-
-
Method Details
-
introspectAccessToken
Parse a raw access token, and extract the basic information from it, including user id by using a givenPrincipalExtractor.- Parameters:
token- A raw tokenprincipalExtractor- PrincipalExtractor instance- Returns:
- Extracted token information as TokenInfo object
-
debugLogJWT
Debug log the given raw token by parsing it as JWT and logging its payload section- Parameters:
log- Logger to usetoken- A raw token
-