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.TokenExchangeProfilesListRequest{
From: management.String(
"from",
),
Take: management.Int(
1,
),
}
client.TokenExchangeProfiles.List(
context.TODO(),
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.tokenExchangeProfiles.list({
from: "from",
take: 1,
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.tokenExchangeProfiles.list({
from: "from",
take: 1,
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/token-exchange-profiles \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/token-exchange-profiles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/token-exchange-profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v2/token-exchange-profiles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/token-exchange-profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"next": "<string>",
"token_exchange_profiles": [
{
"action_id": "<string>",
"created_at": "2024-01-01T00:00:00.000Z",
"id": "<string>",
"name": "Token Exchange Profile 1",
"subject_token_type": "<string>",
"type": "custom_authentication",
"updated_at": "2024-01-01T00:00:00.000Z"
}
]
}トークン交換プロファイルの取得
テナントで利用可能なすべての Token Exchange Profile の一覧を取得します。
この機能を使用すると、Okta’s Master Subscription Agreement の該当する Free Trial 条項に同意したものとみなされます。ユーザーの subject_token を安全に検証する責任はお客様にあります。詳細については、User Guide を参照してください。
このエンドポイントは Checkpoint ページネーションをサポートしています。checkpoint を指定して検索するには、次のパラメーターを使用します。
from: 取得を開始する位置を示す任意の id。take: from パラメーターの使用時に取得するエントリーの総数。デフォルトは 50 です。
注: Checkpoint ページネーションを使用してこのエンドポイントを初めて呼び出すときは、from パラメーターを省略してください。さらに結果がある場合は、レスポンスに next の値が含まれます。これは後続の API 呼び出しで使用できます。レスポンスに next が含まれなくなった時点で、残りのページはありません。
GET
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.TokenExchangeProfilesListRequest{
From: management.String(
"from",
),
Take: management.Int(
1,
),
}
client.TokenExchangeProfiles.List(
context.TODO(),
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.tokenExchangeProfiles.list({
from: "from",
take: 1,
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.tokenExchangeProfiles.list({
from: "from",
take: 1,
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/token-exchange-profiles \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/token-exchange-profiles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/token-exchange-profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v2/token-exchange-profiles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/token-exchange-profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"next": "<string>",
"token_exchange_profiles": [
{
"action_id": "<string>",
"created_at": "2024-01-01T00:00:00.000Z",
"id": "<string>",
"name": "Token Exchange Profile 1",
"subject_token_type": "<string>",
"type": "custom_authentication",
"updated_at": "2024-01-01T00:00:00.000Z"
}
]
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
⌘I