Interface ClientAttributeCertificateResource
public interface ClientAttributeCertificateResource
- Author:
- Stan Silvert ssilvert@redhat.com (C) 2016 Red Hat Inc.
-
Method Summary
Modifier and TypeMethodDescriptionorg.keycloak.representations.idm.CertificateRepresentationgenerate()Generate a new certificate with new key pairbyte[]generateAndGetKeystore(org.keycloak.representations.KeyStoreConfig config) Generate a new keypair and certificate, and get the private key file Generates a keypair and certificate and serves the private key in a specified keystore format.org.keycloak.representations.idm.CertificateRepresentationGet key infobyte[]getKeystore(org.keycloak.representations.KeyStoreConfig config) Get a keystore file for the client, containing private key and public certificateorg.keycloak.representations.idm.CertificateRepresentationUpload certificate and eventually private keyorg.keycloak.representations.idm.CertificateRepresentationuploadJksCertificate(Object output) Upload only certificate, not private key
-
Method Details
-
getKeyInfo
@GET @Produces("application/json") org.keycloak.representations.idm.CertificateRepresentation getKeyInfo()Get key info- Returns:
-
generate
@POST @Path("generate") @Produces("application/json") org.keycloak.representations.idm.CertificateRepresentation generate()Generate a new certificate with new key pair- Returns:
-
uploadJks
@POST @Path("upload") @Consumes("multipart/form-data") @Produces("application/json") org.keycloak.representations.idm.CertificateRepresentation uploadJks(Object output) Upload certificate and eventually private key- Parameters:
output-- Returns:
-
uploadJksCertificate
@POST @Path("upload-certificate") @Consumes("multipart/form-data") @Produces("application/json") org.keycloak.representations.idm.CertificateRepresentation uploadJksCertificate(Object output) Upload only certificate, not private key- Parameters:
output-- Returns:
-
getKeystore
@POST @Path("/download") @Produces("application/octet-stream") @Consumes("application/json") byte[] getKeystore(org.keycloak.representations.KeyStoreConfig config) Get a keystore file for the client, containing private key and public certificate- Parameters:
config- Keystore configuration as JSON. Parameters "keySize" and "validity" of the config are supported since Keycloak 26.3. Key size is 4096 by default and validity is 3 years by default. For older versions than Keycloak 26.3, the key size is 2048 and validity is 10 years.- Returns:
-
generateAndGetKeystore
@POST @Path("/generate-and-download") @Produces("application/octet-stream") @Consumes("application/json") byte[] generateAndGetKeystore(org.keycloak.representations.KeyStoreConfig config) Generate a new keypair and certificate, and get the private key file Generates a keypair and certificate and serves the private key in a specified keystore format. Only generated public certificate is saved in Keycloak DB - the private key is not.- Parameters:
config- Keystore configuration as JSON- Returns:
-