Class KeyResolver

java.lang.Object
org.wso2.carbon.crypto.api.KeyResolver

public abstract class KeyResolver extends Object
The service contract of an implementation of a key resolver.

Key resolvers are used to find the discovery information of keys / certificate, based on the given context.

  • Constructor Details

    • KeyResolver

      public KeyResolver()
  • Method Details

    • getPriority

      public int getPriority()
      Returns the resolver priority.
      Returns:
      The resolver priority.
    • setPriority

      public void setPriority(int priority)
      Sets the resolver priority.
      Parameters:
      priority - The resolver priority.
    • isApplicable

      public abstract boolean isApplicable(CryptoContext cryptoContext)
      Checks whether this resolver is applicable for the given context.
      Parameters:
      cryptoContext - The context information
      Returns:
      true if the resolver is applicable, false otherwise.
    • getPrivateKeyInfo

      public abstract PrivateKeyInfo getPrivateKeyInfo(CryptoContext cryptoContext)
      Returns the discovery information about a private key, based on the given context.
      Parameters:
      cryptoContext - The context information.
      Returns:
      The discovery information about the private key.
    • getCertificateInfo

      public abstract CertificateInfo getCertificateInfo(CryptoContext cryptoContext)
      Returns the discovery information about a certificate, based on the given context.
      Parameters:
      cryptoContext - The context information.
      Returns:
      The discovery information about the certificate.
    • toString

      public String toString()
      Overrides:
      toString in class Object