メインコンテンツへスキップ
POST
https://{tenantDomain}/api/v2
/
token-exchange-profiles
Go
package example

import (
    context "context"

    management "github.com/auth0/go-auth0/management/management"
    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>",
        ),
    )
    request := &management.CreateTokenExchangeProfileRequestContent{
        Name: "name",
        SubjectTokenType: "subject_token_type",
        ActionId: "action_id",
        Type: management.TokenExchangeProfileTypeEnum(
            "custom_authentication",
        ),
    }
    client.TokenExchangeProfiles.Create(
        context.TODO(),
        request,
    )
}
{
  "action_id": "<string>",
  "created_at": "2024-01-01T00:00:00.000Z",
  "id": "<string>",
  "name": "Token Exchange Profile 1",
  "subject_token_type": "<string>",
  "updated_at": "2024-01-01T00:00:00.000Z"
}

承認

Authorization
string
header
必須

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

ボディ

action_id
string
必須

subject_token を検証するために、このプロファイルで実行する Custom Token Exchange Action の ID。Action は custom-token-exchange トリガーを使用する必要があります。

Required string length: 1 - 36
name
string
デフォルト:Token Exchange Profile 1
必須

このプロファイルのフレンドリ名。

Required string length: 3 - 50
subject_token_type
string<url>
必須

このプロファイルのサブジェクトトークンタイプ。Authentication API がトークン交換リクエストを受信すると、一致する subject_token_type を持つ対応するトークン交換プロファイルが実行されます。これは URI である必要があります。

Required string length: 8 - 100
type
enum<string>
必須

プロファイルの種別。トークン交換リクエストの受信時に、このプロファイルをどのように実行するかを制御します。

利用可能なオプション:
custom_authentication
Required string length: 1 - 21

レスポンス

トークン交換プロファイルが正常に作成されました。

action_id
string

subject_token を検証するために、このプロファイルで実行する Custom Token Exchange Action の ID。Action は custom-token-exchange トリガーを使用する必要があります。

Required string length: 1 - 36
created_at
string<date-time>
デフォルト:2024-01-01T00:00:00.000Z

このプロファイルが作成された日時。

id
string<token-exchange-profile-id>

トークン交換プロファイルの一意の ID。

name
string
デフォルト:Token Exchange Profile 1

このプロファイルのフレンドリ名。

Required string length: 3 - 50
subject_token_type
string<url>

このプロファイルのサブジェクトトークンタイプ。Authentication API がトークン交換リクエストを受信すると、一致する subject_token_type を持つ対応するトークン交換プロファイルが実行されます。これは URI である必要があります。

Required string length: 8 - 100
type
enum<string>

プロファイルの種別。トークン交換リクエストの受信時に、このプロファイルをどのように実行するかを制御します。

利用可能なオプション:
custom_authentication
Required string length: 1 - 21
updated_at
string<date-time>
デフォルト:2024-01-01T00:00:00.000Z

このプロファイルが更新された日時。