Class AbstractClaimsSetAuditExtractor<T>
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.oidc.profile.audit.impl.AbstractClaimsSetAuditExtractor<T>
- Type Parameters:
T- the claim type to extract
- All Implemented Interfaces:
Function<ProfileRequestContext,,T> Component,DestructableComponent,InitializableComponent,ContextDataLookupFunction<ProfileRequestContext,T>
- Direct Known Subclasses:
DateBasedJWTClaimAuditExtractor,StringBasedJWTClaimAuditExtractor,StringListBasedJWTClaimAuditExtractor
@ThreadSafe
public abstract class AbstractClaimsSetAuditExtractor<T>
extends AbstractInitializableComponent
implements ContextDataLookupFunction<ProfileRequestContext,T>
An abstract audit extractor function to extract claims from the located claims set.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe name of the claim to extract from the ID token.private Function<ProfileRequestContext,ClaimsSet> Strategy to retrieve the JWT ClaimSet to extract the claim from.private final org.slf4j.LoggerClass logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ProfileRequestContext input) protected voidprotected abstract TImplemented to perform the actual lookup.protected StringGet the claim name to extract.private Function<ProfileRequestContext,ClaimsSet> Get the claims set lookup strategy.voidsetClaimName(String claim) Set the claim whose value is to be extracted from the id_token claims set.voidSet the strategy used to lookup theJWTClaimsSetto look for the claim in.Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
claimName
The name of the claim to extract from the ID token. -
claimsSetLookupStrategy
Strategy to retrieve the JWT ClaimSet to extract the claim from.
-
-
Constructor Details
-
AbstractClaimsSetAuditExtractor
public AbstractClaimsSetAuditExtractor()
-
-
Method Details
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
getClaimName
Get the claim name to extract.- Returns:
- the claim name.
-
setClaimName
Set the claim whose value is to be extracted from the id_token claims set.- Parameters:
claim- the claim name
-
setClaimsSetLookupStrategy
Set the strategy used to lookup theJWTClaimsSetto look for the claim in.- Parameters:
strategy- the strategy
-
getClaimsSetLookupStrategy
Get the claims set lookup strategy.- Returns:
- the strategy
-
doLookup
Implemented to perform the actual lookup.- Parameters:
req- authentication request to perform the lookup from- Returns:
- lookup value or
nullif not found - Throws:
ParseException- on error lookin up the claim
-
apply
- Specified by:
applyin interfaceFunction<ProfileRequestContext,T>
-