Package org.opensaml.security.credential.impl

# Class StaticCredentialResolver

java.lang.Object
org.opensaml.security.credential.impl.AbstractCredentialResolver
org.opensaml.security.credential.impl.StaticCredentialResolver

All Implemented Interfaces:
  `Resolver<Credential,CriteriaSet>`, `CredentialResolver`

Direct Known Subclasses:
  `StaticKeyInfoCredentialResolver`

public class StaticCredentialResolver extends AbstractCredentialResolver
Simple implementation of `CredentialResolver` which just stores and returns a static set of credentials.

Note: no filtering or other evaluation of the credentials is performed. Any Criterion specified are ignored. For a similar Collection-based CredentialResolver implementation which does support evaluation and filtering based on supplied evaluable criteria, see `CollectionCredentialResolver`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final List<Credential>`
`creds`
List of credentials held by this resolver.

## Constructor Summary

Constructors
Constructor
Description
`StaticCredentialResolver(List<Credential> credentials)`
Constructor.
`StaticCredentialResolver(Credential credential)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Iterable<Credential>`
`resolve(CriteriaSet criteria)`

### Methods inherited from class org.opensaml.security.credential.impl.AbstractCredentialResolver

`resolveSingle`

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

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

## Field Details

### creds

@Nonnull private final List<Credential> creds
List of credentials held by this resolver.

## Constructor Details

### StaticCredentialResolver

public StaticCredentialResolver(@Nonnull @ParameterName(name="credentials") List<Credential> credentials)
Constructor.

Parameters:
  `credentials` - collection of credentials to be held by this resolver

### StaticCredentialResolver

public StaticCredentialResolver(@Nonnull @ParameterName(name="credential") Credential credential)
Constructor.

Parameters:
  `credential` - a single credential to be held by this resolver

## Method Details

### resolve

@Nonnull public Iterable<Credential> resolve(@Nullable CriteriaSet criteria) throws ResolverException

Specified by:
  `resolve` in interface `Resolver<Credential,CriteriaSet>`
Specified by:
  `resolve` in class `AbstractCredentialResolver`
Throws:
  `ResolverException`