JSON Web トークン (JWT) 認証トークンを生成します。
操作説明
この API は、IDaaS が発行する Access Token を使用して、身分認証と権限付与を実行します。
提供された Access Token に、IDaaS の組み込み Privileged Access Management (PAM) アプリケーションの「認証トークンの取得」機能にアクセスする権限があることを確認してください。
対応するスコープは urn:cloud:idaas:pam|authentication_token:obtain です。
今すぐお試しください
テスト
RAM 認証
リクエスト構文
POST /v2/{instanceId}/authenticationTokens/_/actions/generateJwt HTTP/1.1
パスパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| instanceId |
string |
必須 |
インスタンス ID。 |
idaas_ue2jvisn35ea5lmthk267xxxxx |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| Authorization |
string |
必須 |
認証情報。形式: Bearer ${access_token}。 説明
IDaaS が発行する Access Token を入力してください。 |
Bearer xxxxxx |
| body |
object |
任意 |
リクエストボディ。 |
|
| credentialProviderIdentifier |
string |
必須 |
認証情報プロバイダー ID。 |
test_example_identifier |
| issuer |
string |
任意 |
JWT の `iss` フィールド。 |
https://test.issuer.com |
| subject |
string |
必須 |
JWT の `sub` フィールド。 |
test_jwt_subject |
| audiences |
array |
必須 |
JWT の `aud` フィールド。 |
|
|
string |
任意 |
JWT オーディエンス。 |
test_jwt_audience |
|
| customClaims |
object |
任意 |
カスタムクレーム。 重要 キーと値のペア。キーは文字列である必要があります。 |
|
|
any |
任意 |
カスタムクレームのキーと値のペア。 |
- |
|
| expiration |
integer |
任意 |
JWT の有効期間 (秒単位)。 |
900 |
| includeDerivedShortToken |
boolean |
任意 |
生成される JWT に「派生ショートトークン」を含める必要があるかどうか。 |
true |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
JWT 認証トークンの詳細。 |
||
| instanceId |
string |
インスタンス ID。 |
idaas_ue2jvisn35ea5lmthk267xxxxx |
| authenticationTokenId |
string |
認証トークン ID。 |
atntkn_01kqflm0sxxx8nmdc1cb5dskxxxxx |
| credentialProviderId |
string |
認証情報プロバイダー ID。 |
atp_01kr2cmj5gxxx4fvmls2e93dxxxxx |
| createTime |
integer |
認証トークンの作成時間 (UNIX タイムスタンプ、ミリ秒単位)。 |
1649830225000 |
| updateTime |
integer |
認証トークンの更新時間 (UNIX タイムスタンプ、ミリ秒単位)。 |
1649830225000 |
| authenticationTokenType |
string |
認証トークンタイプ。 説明
値は |
jwt |
| revoked |
boolean |
認証トークンが取り消されているかどうか。 |
false |
| creatorType |
string |
認証トークン作成者タイプ。有効な値:
|
application |
| creatorId |
string |
認証トークン作成者 ID。 |
app_ngtkgrrxxxxktg5eao6z4xxxxx |
| consumerType |
string |
認証トークンコンシューマータイプ。有効な値:
|
custom |
| consumerId |
string |
認証トークンコンシューマー ID。 |
test_jwt_subject |
| expirationTime |
integer |
認証トークン有効期限 (UNIX タイムスタンプ、ミリ秒単位)。 |
1772693568000 |
| jwtContent |
object |
JWT 認証トークンコンテンツ。 |
|
| jwtValue |
string |
JWT コンテンツ。 |
eyJhbGciOixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| derivedShortToken |
string |
JWT の派生ショートトークン。 |
sk-Nx2vzxxxxxxxxxxxxxxxxx |
例
成功レスポンス
JSONJSON
{
"instanceId": "idaas_ue2jvisn35ea5lmthk267xxxxx",
"authenticationTokenId": "atntkn_01kqflm0sxxx8nmdc1cb5dskxxxxx",
"credentialProviderId": "atp_01kr2cmj5gxxx4fvmls2e93dxxxxx",
"createTime": 1649830225000,
"updateTime": 1649830225000,
"authenticationTokenType": "jwt",
"revoked": false,
"creatorType": "application",
"creatorId": "app_ngtkgrrxxxxktg5eao6z4xxxxx",
"consumerType": "custom",
"consumerId": "test_jwt_subject",
"expirationTime": 1772693568000,
"jwtContent": {
"jwtValue": "eyJhbGciOixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"derivedShortToken": "sk-Nx2vzxxxxxxxxxxxxxxxxx"
}
}
エラーコード
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。