Go
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
keys "github.com/auth0/go-auth0/management/management/keys"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &keys.SetCustomSigningKeysRequestContent{
Keys: []*management.CustomSigningKeyJwk{
&management.CustomSigningKeyJwk{
Kty: management.CustomSigningKeyTypeEnumEc,
},
},
}
client.Keys.CustomSigning.Set(
context.TODO(),
request,
)
}{
"keys": [
{
"e": "<string>",
"key_ops": [],
"kid": "<string>",
"n": "<string>",
"x": "<string>",
"x5c": [
"<string>"
],
"x5t": "<string>",
"x5t#S256": "<string>",
"x5u": "<string>",
"y": "<string>"
}
]
}カスタム署名キーを設定
カスタム署名鍵の JWKS 表現全体を作成または置換します。
PUT
https://{tenantDomain}/api/v2
/
keys
/
custom-signing
Go
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
keys "github.com/auth0/go-auth0/management/management/keys"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &keys.SetCustomSigningKeysRequestContent{
Keys: []*management.CustomSigningKeyJwk{
&management.CustomSigningKeyJwk{
Kty: management.CustomSigningKeyTypeEnumEc,
},
},
}
client.Keys.CustomSigning.Set(
context.TODO(),
request,
)
}{
"keys": [
{
"e": "<string>",
"key_ops": [],
"kid": "<string>",
"n": "<string>",
"x": "<string>",
"x5c": [
"<string>"
],
"x5t": "<string>",
"x5t#S256": "<string>",
"x5u": "<string>",
"y": "<string>"
}
]
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ボディ
application/jsonapplication/x-www-form-urlencoded
カスタム公開署名鍵の配列を表す JWKS。
カスタム公開署名鍵の配列。
Minimum array length:
1Show child attributes
Show child attributes
レスポンス
カスタム署名鍵を正常に作成または置換しました。
カスタム公開署名鍵の配列を表す JWKS。
カスタム公開署名鍵の配列。
Show child attributes
Show child attributes
⌘I