Package org.opensaml.security.trust.impl

# Class ExplicitKeyTrustEvaluator

java.lang.Object
org.opensaml.security.trust.impl.ExplicitKeyTrustEvaluator

public class ExplicitKeyTrustEvaluator extends Object
Auxillary trust evaluator for evaluating an untrusted key or credential against a trusted key or credential. Trust is established if the untrusted key (a public key or symmetric key from the untrusted credential) matches one of the trusted keys supplied.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Constructor
Description
`ExplicitKeyTrustEvaluator()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`validate(Key untrustedKey, Iterable<Key> trustedKeys)`
Evaluate trust.
`boolean`
`validate(Key untrustedKey, Key trustedKey)`
Evaluate trust.
`boolean`
`validate(Credential untrustedCredential, Iterable<Credential> trustedCredentials)`
Evaluate trust.
`boolean`
`validate(Credential untrustedCredential, Credential trustedCredential)`
Evaluate trust.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

## Constructor Details

### ExplicitKeyTrustEvaluator

public ExplicitKeyTrustEvaluator()

## Method Details

### validate

public boolean validate(@Nonnull Key untrustedKey, @Nonnull Key trustedKey)
Evaluate trust.

Parameters:
  `untrustedKey` - the untrusted key to evaluate
  `trustedKey` - basis for trust
Returns:
  true if trust can be established, false otherwise

### validate

public boolean validate(@Nonnull Key untrustedKey, @Nonnull Iterable<Key> trustedKeys)
Evaluate trust.

Parameters:
  `untrustedKey` - the untrusted key to evaluate
  `trustedKeys` - basis for trust
Returns:
  true if trust can be established, false otherwise

### validate

public boolean validate(@Nonnull Credential untrustedCredential, @Nonnull Credential trustedCredential)
Evaluate trust.

Parameters:
  `untrustedCredential` - the untrusted credential to evaluate
  `trustedCredential` - basis for trust
Returns:
  true if trust can be established, false otherwise

### validate

public boolean validate(@Nonnull Credential untrustedCredential, @Nonnull Iterable<Credential> trustedCredentials)
Evaluate trust.

Parameters:
  `untrustedCredential` - the untrusted credential to evaluate
  `trustedCredentials` - basis for trust
Returns:
  true if trust can be established, false otherwise