Class DPoPAccessTokenHashFromRequestLookupFunction
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.plugin.oidc.op.profile.logic.DPoPAccessTokenHashFromRequestLookupFunction
- All Implemented Interfaces:
Function<ProfileRequestContext,,String> Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
public class DPoPAccessTokenHashFromRequestLookupFunction
extends AbstractIdentifiableInitializableComponent
implements Function<ProfileRequestContext,String>
A function that calculates a hash of the DPoP access token from the
HttpServletRequest if found. The token
value is fetched via Authorization header or via token token-parameter if the inbound message is an introspection or
revocation request.- Since:
- 4.2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Supplier<HttpServletRequest>Supplier for theHttpServletRequest.private org.slf4j.LoggerClass logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ProfileRequestContext input) protected StringcalculateHash(com.nimbusds.oauth2.sdk.token.DPoPAccessToken token) Calculates the SHA-256 hash of the given DPoP access token.protected voidvoidSet the supplier for theHttpServletRequest.Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
httpServletRequestSupplier
Supplier for theHttpServletRequest.
-
-
Constructor Details
-
DPoPAccessTokenHashFromRequestLookupFunction
public DPoPAccessTokenHashFromRequestLookupFunction()
-
-
Method Details
-
setHttpServletRequestSupplier
Set the supplier for theHttpServletRequest.- Parameters:
supplier- What to set.
-
doInitialize
- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
apply
- Specified by:
applyin interfaceFunction<ProfileRequestContext,String>
-
calculateHash
Calculates the SHA-256 hash of the given DPoP access token.- Parameters:
token- the DPoP access token- Returns:
- the SHA-256 hash value or null if it cannot be calculated
-