Class KeyInfoReferenceProvider

All Implemented Interfaces:

public class KeyInfoReferenceProvider extends AbstractKeyInfoProvider
Implementation of KeyInfoProvider which supports KeyInfoReference.

To prevent cycles, only a single reference step is permitted. Only same-document references are supported.

  • Field Details

    • log

      private final org.slf4j.Logger log
      Class logger.
  • Constructor Details

    • KeyInfoReferenceProvider

      public KeyInfoReferenceProvider()
  • Method Details

    • handles

      public boolean handles(@Nonnull XMLObject keyInfoChild)
      Evaluate whether the given provider should attempt to handle resolving a credential from the specified KeyInfo child. An evaluation of true does not guarantee that a credential can or will be extracted form the particular KeyInfo child, only that processing should be attempted.
      keyInfoChild - the KeyInfo child object to consider
      true if the provider should attempt to resolve credentials, false otherwise
    • process

      @Nullable public Collection<Credential> process(@Nonnull KeyInfoCredentialResolver resolver, @Nonnull XMLObject keyInfoChild, @Nullable CriteriaSet criteriaSet, @Nonnull KeyInfoResolutionContext kiContext) throws SecurityException
      Process a specified KeyInfo child (XMLobject) and attempt to resolve a credential from it.
      resolver - reference to a resolver which is calling the provider
      keyInfoChild - the KeyInfo child being processed
      criteriaSet - the credential criteria the credential must satisfy
      kiContext - the resolution context, used for sharing state amongst resolvers and providers
      a resolved Credential collection, or null
      SecurityException - if there is an error during credential resolution. Note: failure to resolve a credential is not an error.
    • getKeyInfoReference

      @Nullable protected KeyInfoReference getKeyInfoReference(@Nonnull XMLObject xmlObject)
      Get the KeyInfoReference from the passed XML object.
      xmlObject - an XML object, presumably a KeyInfoReference
      the KeyInfoReference which was found, or null if none or invalid