Class AbstractBasicCredentialFactoryBean

All Implemented Interfaces:
Aware, BeanClassLoaderAware, BeanFactoryAware, DisposableBean, FactoryBean<BasicCredential>, InitializingBean
Direct Known Subclasses:
BasicInlineCredentialFactoryBean, BasicResourceCredentialFactoryBean

public abstract class AbstractBasicCredentialFactoryBean extends AbstractCredentialFactoryBean<BasicCredential>
A factory bean to collect information to do with a BasicCredential.
  • Field Details

  • Constructor Details

    • AbstractBasicCredentialFactoryBean

      public AbstractBasicCredentialFactoryBean()
  • Method Details

    • decodeSecretKey

      protected byte[] decodeSecretKey(String data)
      Decode the SecretKey data, based on the specified encoding.
      Parameters:
      data - the Secret key data
      Returns:
      the decoded SecretKey byte array
    • decodeSecretKey

      protected byte[] decodeSecretKey(byte[] data)
      Decode the SecretKey data, based on the specified encoding.
      Parameters:
      data - the Secret key data
      Returns:
      the decoded SecretKey byte array
    • doCreateInstance

      protected BasicCredential doCreateInstance() throws Exception
      Specified by:
      doCreateInstance in class AbstractComponentAwareFactoryBean<BasicCredential>
      Throws:
      Exception
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface FactoryBean<BasicCredential>
      Specified by:
      getObjectType in class AbstractFactoryBean<BasicCredential>
    • getSecretKeyAlgorithm

      @Nullable public String getSecretKeyAlgorithm()
      Get the algorithm for the SecretKey.
      Returns:
      Returns the SecretKey algorithm
    • setSecretKeyAlgorithm

      public void setSecretKeyAlgorithm(@Nonnull String algorithm)
      Set the algorithm for the SecretKey.
      Parameters:
      algorithm - The algorithm to set.
    • getSecretKeyEncoding

      Get the SecretKey encoding. Defaults to: base64.
      Returns:
      the encoding
    • setSecretKeyEncoding

      public void setSecretKeyEncoding(@Nonnull AbstractBasicCredentialFactoryBean.SecretKeyEncoding encoding)
      Set the SecretKey encoding. Defaults to: base64
      Parameters:
      encoding - the new encoding
    • getPublicKey

      @Nullable protected abstract PublicKey getPublicKey()
      return the configured Public Key.
      Returns:
      the key, or none if not configured.
    • getPrivateKey

      @Nullable protected abstract PrivateKey getPrivateKey()
      Get the configured Private key.
      Returns:
      the key or null if non configured
    • getSecretKey

      @Nullable protected abstract SecretKey getSecretKey()
      return the configured Secret Key.
      Returns:
      the key, or none if not configured.