com.bettercloud.vault.api.pki.CredentialFormat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vault-java-driver Show documentation
Show all versions of vault-java-driver Show documentation
Zero-dependency Java client for HashiCorp's Vault
package com.bettercloud.vault.api.pki;
import java.util.List;
/**
* Possible format options for credentials issued by the PKI backend.
*
* See: {@link Pki#issue(String, String, List, List, Integer, CredentialFormat) Pki.issue}
*/
public enum CredentialFormat {
PEM,
DER,
PEM_BUNDLE;
public static CredentialFormat fromString(final String text) {
if (text != null) {
for (final CredentialFormat format : CredentialFormat.values()) {
if (text.equalsIgnoreCase(format.toString())) {
return format;
}
}
}
return null;
}
@Override
public String toString() {
return super.toString().toLowerCase();
}
}