Class PemCredentialConfigurationProperties

java.lang.Object
se.swedenconnect.security.credential.config.properties.AbstractBaseCredentialConfigurationProperties
se.swedenconnect.security.credential.config.properties.PemCredentialConfigurationProperties
All Implemented Interfaces:
BaseCredentialConfiguration, PemCredentialConfiguration

public class PemCredentialConfigurationProperties extends AbstractBaseCredentialConfigurationProperties implements PemCredentialConfiguration
Configuration properties for creating a PkiCredential using PEM-encoded certificate(s) and private keys.
Author:
Martin Lindström
  • Constructor Details

    • PemCredentialConfigurationProperties

      public PemCredentialConfigurationProperties()
  • Method Details

    • getPublicKey

      @Nullable public String getPublicKey()
      Gets the location or content of the public key in PEM format.
      Returns:
      the public key location or content
    • setPublicKey

      public void setPublicKey(@Nullable String publicKey)
      Assigns the location or content of the public key in PEM format.
      Parameters:
      publicKey - the public key location or content
    • getCertificates

      @Nullable public String getCertificates()
      Gets the location or content of the certificate or certificate chain in PEM format.
      Returns:
      the certificate(s) location or content
    • setCertificates

      public void setCertificates(@Nullable String certificates)
      Assigns the location or content of the certificate or certificate chain in PEM format.
      Parameters:
      certificates - the certificate(s) location or content
    • getPrivateKey

      @Nullable public String getPrivateKey()
      Gets the location or content of the private key in PEM format.
      Returns:
      the private key location or content
    • setPrivateKey

      public void setPrivateKey(@Nullable String privateKey)
      Assigns the location or content of the private key in PEM format.
      Parameters:
      privateKey - the private key location or content
    • getKeyPassword

      @Nullable public String getKeyPassword()
      Gets the password used to decrypt the private key.
      Returns:
      the private key password
    • setKeyPassword

      public void setKeyPassword(@Nullable String keyPassword)
      Assigns the password used to decrypt the private key.
      Parameters:
      keyPassword - the private key password
    • publicKey

      public Optional<String> publicKey()
      Location or content of the public key in PEM format.

      This setting is mutually exclusive with the PemCredentialConfiguration.certificates() setting.

      Specified by:
      publicKey in interface PemCredentialConfiguration
      Returns:
      the location or content of the public key
    • certificates

      public Optional<String> certificates()
      Location or content of the certificate or certificate chain in PEM format.

      If more than one certificate is supplied, the entity certificate, i.e., the certificate holding the public key of the key pair, must be placed first.

      This setting is mutually exclusive with the PemCredentialConfiguration.publicKey() setting.

      Specified by:
      certificates in interface PemCredentialConfiguration
      Returns:
      the location or content of the certificate or certificate chain in PEM format
    • privateKey

      public String privateKey()
      Location or content of the private key in PEM format.
      Specified by:
      privateKey in interface PemCredentialConfiguration
      Returns:
      the location or content of the private key in PEM format
    • keyPassword

      public Optional<String> keyPassword()
      Password used to decrypt an encrypted private key.
      Specified by:
      keyPassword in interface PemCredentialConfiguration
      Returns:
      key password
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AbstractBaseCredentialConfigurationProperties
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractBaseCredentialConfigurationProperties