Passer au contenu principal
POST
https://{tenantDomain}/api/v2
/
keys
/
encryption
/
{kid}
/
wrapping-key
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Keys.Encryption.CreatePublicWrappingKeyAsync(
            "kid"
        );
    }

}
package example

import (
context "context"

client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
client.Keys.Encryption.CreatePublicWrappingKey(
context.TODO(),
"kid",
)
}
package com.example.usage;

import com.auth0.client.mgmt.ManagementApi;

public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();

client.keys().encryption().createPublicWrappingKey("kid");
}
}
<?php

namespace Example;

use Auth0\SDK\API\Management\Management;

$client = new Management(
token: '<token>',
);
$client->keys->encryption->createPublicWrappingKey(
'kid',
);
from auth0.management import ManagementClient

client = ManagementClient(
token="<token>",
)

client.keys.encryption.create_public_wrapping_key(
kid="kid",
)
require "auth0"

client = Auth0::Management.new(token: "<token>")

client.keys.encryption.create_public_wrapping_key(kid: "kid")
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.keys.encryption.createPublicWrappingKey("kid");
}
main();
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.keys.encryption.createPublicWrappingKey("kid");
}
main();
curl --request POST \
--url https://{tenantDomain}/api/v2/keys/encryption/{kid}/wrapping-key \
--header 'Authorization: Bearer <token>'
{
  "public_key": "<string>",
  "algorithm": "CKM_RSA_AES_KEY_WRAP"
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

kid
string
requis

Encryption key ID

Réponse

The public wrapping key was successfully created.

public_key
string
requis

Public wrapping key in PEM format

algorithm
enum<string>
requis

Encryption algorithm that shall be used to wrap your key material

Options disponibles:
CKM_RSA_AES_KEY_WRAP