Class KeyStoreCredentialSource

java.lang.Object
org.wildfly.security.credential.source.impl.KeyStoreCredentialSource
All Implemented Interfaces:
org.wildfly.security.credential.source.CredentialSource

public final class KeyStoreCredentialSource extends Object implements org.wildfly.security.credential.source.CredentialSource
A credential source which is backed by a key store entry.
Author:
David M. Lloyd
  • Constructor Details

    • KeyStoreCredentialSource

      public KeyStoreCredentialSource(KeyStore keyStore, String alias, KeyStore.ProtectionParameter protectionParameter)
      Construct a new instance.
      Parameters:
      keyStore - the key store to reference (must not be null)
      alias - the name of the key store entry to read from (must not be null)
      protectionParameter - the protection parameter to use to access the key store entry, or null for none
    • KeyStoreCredentialSource

      public KeyStoreCredentialSource(org.wildfly.security.SecurityFactory<KeyStore.Entry> entryFactory)
      Construct a new instance.
      Parameters:
      entryFactory - the entry factory to use to instantiate the entry (must not be null)
  • Method Details

    • getCredentialAcquireSupport

      public org.wildfly.security.auth.SupportLevel getCredentialAcquireSupport(Class<? extends org.wildfly.security.credential.Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec) throws IOException
      Specified by:
      getCredentialAcquireSupport in interface org.wildfly.security.credential.source.CredentialSource
      Throws:
      IOException
    • getCredential

      public <C extends org.wildfly.security.credential.Credential> C getCredential(Class<C> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec) throws IOException
      Specified by:
      getCredential in interface org.wildfly.security.credential.source.CredentialSource
      Throws:
      IOException