- java.lang.Object
-
- io.github.jopenlibs.vault.api.pki.Credential
-
- All Implemented Interfaces:
java.io.Serializable
public class Credential extends java.lang.Object implements java.io.Serializable
A container for credential details returned endpoints on the PKI backend. (see:
Pki.issue(String, String, List, List, String, CredentialFormat)
Pki.issue }. This class is meant for use with a builder pattern style. Example usage:final Credential options = new Credential() .certificate(...) .issuingCa(...) .privateKey(...) .privateKeyType(...) .serialNumber(...);
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Credential()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Credential
certificate(java.lang.String certificate)
java.lang.String
getCertificate()
java.lang.String
getIssuingCa()
java.lang.String
getPrivateKey()
java.lang.String
getPrivateKeyType()
java.lang.String
getSerialNumber()
Credential
issuingCa(java.lang.String issuingCa)
Credential
privateKey(java.lang.String privateKey)
Credential
privateKeyType(java.lang.String privateKeyType)
Credential
serialNumber(java.lang.String serialNumber)
-
-
-
Method Detail
-
certificate
public Credential certificate(java.lang.String certificate)
- Parameters:
certificate
- A certificate, in PEM format- Returns:
- This object, with the certificate populated, ready for other builder methods or immediate use.
-
issuingCa
public Credential issuingCa(java.lang.String issuingCa)
- Parameters:
issuingCa
- The issuing CA certificate, in PEM format- Returns:
- This object, with the issuing CA certificate populated, ready for other builder methods or immediate use.
-
privateKey
public Credential privateKey(java.lang.String privateKey)
- Parameters:
privateKey
- The private key, in PEM format- Returns:
- This object, with the private key populated, ready for other builder methods or immediate use.
-
privateKeyType
public Credential privateKeyType(java.lang.String privateKeyType)
- Parameters:
privateKeyType
- The private key type (e.g. "rsa")- Returns:
- This object, with the private key type populated, ready for other builder methods or immediate use.
-
serialNumber
public Credential serialNumber(java.lang.String serialNumber)
- Parameters:
serialNumber
- An identifier generated by Vault- Returns:
- This object, with the serial number populated, ready for other builder methods or immediate use.
-
getCertificate
public java.lang.String getCertificate()
-
getIssuingCa
public java.lang.String getIssuingCa()
-
getPrivateKey
public java.lang.String getPrivateKey()
-
getPrivateKeyType
public java.lang.String getPrivateKeyType()
-
getSerialNumber
public java.lang.String getSerialNumber()
-
-