Class CollectionCredentialResolver

  • All Implemented Interfaces:
    net.shibboleth.utilities.java.support.resolver.Resolver<org.opensaml.security.credential.Credential,​net.shibboleth.utilities.java.support.resolver.CriteriaSet>, org.opensaml.security.credential.CredentialResolver

    public class CollectionCredentialResolver
    extends AbstractCriteriaFilteringCredentialResolver
    An implementation of CredentialResolver that uses a Collection as the underlying credential source.

    The credentials returned are filtered based on any EvaluableCredentialCriterion that may have been present in the specified criteria set, or that are resolved by lookup in the EvaluableCredentialCriteriaRegistry.

    • Field Detail

      • collection

        private final Collection<org.opensaml.security.credential.Credential> collection
        The collection of credentials which is the underlying store for the resolver.
    • Constructor Detail

      • CollectionCredentialResolver

        public CollectionCredentialResolver()
        Constructor. An ArrayList is used as the underlying collection implementation.
      • CollectionCredentialResolver

        public CollectionCredentialResolver​(@Nonnull
                                            Collection<org.opensaml.security.credential.Credential> credentials)
        Constructor.
        Parameters:
        credentials - the credential collection which is the backing store for the resolver
    • Method Detail

      • getCollection

        @Nonnull
        public Collection<org.opensaml.security.credential.Credential> getCollection()
        Get the (modifiable) credential collection which is the backing store for the resolver.
        Returns:
        the credential collection backing store
      • resolveFromSource

        @Nonnull
        protected Iterable<org.opensaml.security.credential.Credential> resolveFromSource​(@Nullable
                                                                                          net.shibboleth.utilities.java.support.resolver.CriteriaSet criteriaSet)
                                                                                   throws net.shibboleth.utilities.java.support.resolver.ResolverException
        Subclasses are required to implement this method to resolve credentials from the implementation-specific type of underlying credential source.
        Specified by:
        resolveFromSource in class AbstractCriteriaFilteringCredentialResolver
        Parameters:
        criteriaSet - the set of criteria used to resolve credentials from the credential source
        Returns:
        an Iterable for the resolved set of credentials
        Throws:
        net.shibboleth.utilities.java.support.resolver.ResolverException - thrown if there is an error resolving credentials from the credential source