org.keycloak.admin.client.resource

## Interface ClientAttributeCertificateResource

-     public interface ClientAttributeCertificateResource

  Author:
    Stan Silvert ssilvert@redhat.com (C) 2016 Red Hat Inc.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `CertificateRepresentation` | `generate()` Generate a new certificate with new key pair
    `byte[]` | `generateAndGetKeystore(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.
    `CertificateRepresentation` | `getKeyInfo()` Get key info
    `byte[]` | `getKeystore(KeyStoreConfig config)` Get a keystore file for the client, containing private key and public certificate
    `CertificateRepresentation` | `uploadJks(org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataOutput output)` Upload certificate and eventually private key
    `CertificateRepresentation` | `uploadJksCertificate(org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataOutput output)` Upload only certificate, not private key

- - ### Method Detail

    - #### getKeyInfo

          @GET
           @Produces(value="application/json")
          CertificateRepresentation getKeyInfo()

      Get key info
      Returns:

    - #### generate

          @POST
           @Path(value="generate")
           @Produces(value="application/json")
          CertificateRepresentation generate()

      Generate a new certificate with new key pair
      Returns:

    - #### uploadJks

          @POST
           @Path(value="upload")
           @Consumes(value="multipart/form-data")
           @Produces(value="application/json")
          CertificateRepresentation uploadJks(org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataOutput output)

      Upload certificate and eventually private key
      Parameters:
        `output` -
      Returns:

    - #### uploadJksCertificate

          @POST
           @Path(value="upload-certificate")
           @Consumes(value="multipart/form-data")
           @Produces(value="application/json")
          CertificateRepresentation uploadJksCertificate(org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataOutput output)

      Upload only certificate, not private key
      Parameters:
        `output` -
      Returns:

    - #### getKeystore

          @POST
           @Path(value="/download")
           @Produces(value="application/octet-stream")
           @Consumes(value="application/json")
          byte[] getKeystore(KeyStoreConfig config)

      Get a keystore file for the client, containing private key and public certificate
      Parameters:
        `config` - Keystore configuration as JSON
      Returns:

    - #### generateAndGetKeystore

          @POST
           @Path(value="/generate-and-download")
           @Produces(value="application/octet-stream")
           @Consumes(value="application/json")
          byte[] generateAndGetKeystore(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:

Copyright © 2021 JBoss by Red Hat. All rights reserved.