Module org.zalando.logbook.core
Class JwtFirstMatchingClaimExtractor
java.lang.Object
org.zalando.logbook.core.attributes.JwtFirstMatchingClaimExtractor
- All Implemented Interfaces:
org.zalando.logbook.attributes.AttributeExtractor
@API(status=EXPERIMENTAL)
public final class JwtFirstMatchingClaimExtractor
extends Object
implements org.zalando.logbook.attributes.AttributeExtractor
Extracts a single claim from the JWT bearer token in the request Authorization header.
Jackson 3.x (tools.jackson namespace) version.
By default, the subject claim "sub" is extracted, but you can pass an (ordered) list of
claimNames
to be scanned. The first claim in claimNames is then returned, or an empty attribute if no matching
claim is found.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionJwtFirstMatchingClaimExtractor(tools.jackson.databind.json.JsonMapper jsonMapper, List<String> claimNames, String claimKey) -
Method Summary
Modifier and TypeMethodDescriptionorg.zalando.logbook.attributes.HttpAttributesextract(org.zalando.logbook.HttpRequest request) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.zalando.logbook.attributes.AttributeExtractor
extract
-
Constructor Details
-
JwtFirstMatchingClaimExtractor
-
-
Method Details
-
extract
@Nonnull public org.zalando.logbook.attributes.HttpAttributes extract(org.zalando.logbook.HttpRequest request) - Specified by:
extractin interfaceorg.zalando.logbook.attributes.AttributeExtractor
-