Class ClientInformationJWTTrustEngine
java.lang.Object
net.shibboleth.oidc.security.impl.BaseSignedJWTTrustEngine<Iterable<Credential>>
net.shibboleth.oidc.security.impl.ExplicitKeySignedJWTTrustEngine
net.shibboleth.oidc.security.impl.ClientInformationJWTTrustEngine
- All Implemented Interfaces:
TrustedCredentialTrustEngine<SignedJWT>,TrustEngine<SignedJWT>
public class ClientInformationJWTTrustEngine
extends ExplicitKeySignedJWTTrustEngine
implements TrustedCredentialTrustEngine<SignedJWT>
An implementation of
SignatureTrustEngine which evaluates the validity
and trustworthiness of JWT signatures.
This extends ExplicitKeySignedJWTTrustEngine by adding a configurable lookup strategy for the signature
algorithm that must be used in the incoming token. Also a default value can be set if the function returns no
value. If neither function is returning value nor the default value is set, then any signature accepted by the
parent class is accepted.
- Since:
- 2.2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe default algorithm value used if lookup strategy returned null.private final org.slf4j.LoggerClass logger.private final Function<OIDCClientInformation,String> A lookup function for the signature algorithm in the client metadata. -
Constructor Summary
ConstructorsConstructorDescriptionClientInformationJWTTrustEngine(CredentialResolver resolver, JOSEObjectCredentialResolver joseObjectResolver, Function<OIDCClientInformation, String> strategy, String defaultValue) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleandoValidate(SignedJWT signedJWT, CriteriaSet trustBasisCriteria) Validate the signed JWT using the supplied trust criteria.protected StringgetExpectedAlgorithm(ClientInformationCriterion criterion) Fetches the expected signature algorithm from theOIDCClientInformation.Methods inherited from class net.shibboleth.oidc.security.impl.ExplicitKeySignedJWTTrustEngine
evaluateTrust, getCredentialResolverMethods inherited from class net.shibboleth.oidc.security.impl.BaseSignedJWTTrustEngine
checkParams, resolveTokenCredentials, validate, validate, verifySignatureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensaml.security.trust.TrustedCredentialTrustEngine
getCredentialResolverMethods inherited from interface org.opensaml.security.trust.TrustEngine
validate
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
signatureAlgorithmLookupStrategy
A lookup function for the signature algorithm in the client metadata. -
defaultAlgorithmValue
The default algorithm value used if lookup strategy returned null.
-
-
Constructor Details
-
ClientInformationJWTTrustEngine
public ClientInformationJWTTrustEngine(@Nonnull @ParameterName(name="resolver") CredentialResolver resolver, @Nonnull @ParameterName(name="JOSEObjectResolver") JOSEObjectCredentialResolver joseObjectResolver, @Nonnull @ParameterName(name="signatureAlgorithmLookupStrategy") Function<OIDCClientInformation, String> strategy, @Nullable @ParameterName(name="defaultAlgorithmValue") String defaultValue) Constructor.- Parameters:
resolver- credential resolver used to resolve trusted credentials.joseObjectResolver- resolver which resolve credentials from the headers of aJOSEObjectinstance.strategy- lookup strategy for the signature algorithm in the client metadata.defaultValue- the default signature algorithm value.
-
-
Method Details
-
getExpectedAlgorithm
Fetches the expected signature algorithm from theOIDCClientInformation.- Parameters:
criterion- criterion containing the client information/metadata.- Returns:
- the expected algorithm value.