Class DefaultUnregisteredClientPolicyValidator
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.plugin.oidc.op.profile.logic.DefaultUnregisteredClientPolicyValidator
- All Implemented Interfaces:
Predicate<Map<String,,UnregisteredClientPolicy>> Component,DestructableComponent,InitializableComponent
public class DefaultUnregisteredClientPolicyValidator
extends AbstractInitializableComponent
implements Predicate<Map<String,UnregisteredClientPolicy>>
Default validator for the unregistered client policies. Scope must be specified via value and/or custom operators.
Response types must be specified via one_of and/or custom operators. Client ID and redirect URIs must be specified
via one_of, regexp or custom operators.
- Since:
- 3.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private Predicate<Map<String,MetadataPolicy>> The generic syntax validator for the policy. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanpreChecksForMandatoryKey(MetadataPolicy policy, String key) Verifies that the policy is not containing forbidden content.voidsetSyntaxValidator(Predicate<Map<String, MetadataPolicy>> predicate) Set the generic syntax validator for the policy.booleanprotected booleanverifyClientIdPolicy(MetadataPolicy policy) Verifies that the client_id is specified with one_of or regexp -operators.protected booleanVerifies that the redirect_uri is specified with one_of or regexp -operators.protected booleanVerifies that the response type is specified with one_of -operator.protected booleanverifyScopePolicy(MetadataPolicy policy) Verifies that the scope is specified with value -operator.Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
syntaxValidator
The generic syntax validator for the policy.
-
-
Constructor Details
-
DefaultUnregisteredClientPolicyValidator
public DefaultUnregisteredClientPolicyValidator()Constructor.
-
-
Method Details
-
setSyntaxValidator
Set the generic syntax validator for the policy.- Parameters:
predicate- What to set.
-
test
- Specified by:
testin interfacePredicate<Map<String,UnregisteredClientPolicy>>
-
verifyScopePolicy
Verifies that the scope is specified with value -operator.- Parameters:
policy- The policy to be verified.- Returns:
- true if verified, false otherwise.
-
verifyResponseTypePolicy
Verifies that the response type is specified with one_of -operator.- Parameters:
policy- The policy to be verified.- Returns:
- true if verified, false otherwise.
-
verifyRedirectUriPolicy
Verifies that the redirect_uri is specified with one_of or regexp -operators.- Parameters:
policy- The policy to be verified.- Returns:
- true if verified, false otherwise.
-
verifyClientIdPolicy
Verifies that the client_id is specified with one_of or regexp -operators.- Parameters:
policy- The policy to be verified.- Returns:
- true if verified, false otherwise.
-
preChecksForMandatoryKey
Verifies that the policy is not containing forbidden content.- Parameters:
policy- The policy to be verified.key- The claim to be verified, used for logging only.- Returns:
- true if verified, false otherwise.
-