CommunicationIdentityClient class
ユーザー トークン管理を操作するためのクライアント クラスAzure Communication Services。
コンストラクター
Communication |
CommunicationIdentity クラスの新しいインスタンスを初期化します。 |
Communication |
Azure KeyCredential を使用して CommunicationIdentity クラスの新しいインスタンスを初期化します。 |
Communication |
TokenCredential を使用して CommunicationIdentity クラスの新しいインスタンスを初期化します。 |
メソッド
create |
1 人のユーザーを作成します。 |
create |
1 人のユーザーとトークンを同時に作成します。 |
delete |
ユーザーの失効イベントをトリガーし、そのすべてのデータを削除します。 |
get |
スコープ付きユーザー トークンを作成します。 |
get |
Teams ユーザーの Azure AD アクセス トークンを、有効期限が一致する新しいコミュニケーション ID アクセス トークンと交換します。 |
revoke |
ユーザーに対して作成されたすべてのデータとトークンを取り消します。 |
コンストラクターの詳細
CommunicationIdentityClient(string, CommunicationIdentityClientOptions)
CommunicationIdentity クラスの新しいインスタンスを初期化します。
new CommunicationIdentityClient(connectionString: string, options?: CommunicationIdentityClientOptions)
パラメーター
- connectionString
-
string
Azure Communication Service リソースに接続するための接続文字列。 例: "endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret";
省略可能。 HTTP パイプラインを構成するためのオプション。
CommunicationIdentityClient(string, KeyCredential, CommunicationIdentityClientOptions)
Azure KeyCredential を使用して CommunicationIdentity クラスの新しいインスタンスを初期化します。
new CommunicationIdentityClient(endpoint: string, credential: KeyCredential, options?: CommunicationIdentityClientOptions)
パラメーター
- endpoint
-
string
サービスのエンドポイント (例: https://contoso.eastus.communications.azure.net)。
- credential
-
KeyCredential
サービスへの要求を認証するために使用される オブジェクト。 AzureKeyCredential または @azure/identity
を使用して資格情報を作成します。
任意。 HTTP パイプラインを構成するためのオプション。
CommunicationIdentityClient(string, TokenCredential, CommunicationIdentityClientOptions)
TokenCredential を使用して CommunicationIdentity クラスの新しいインスタンスを初期化します。
new CommunicationIdentityClient(endpoint: string, credential: TokenCredential, options?: CommunicationIdentityClientOptions)
パラメーター
- endpoint
-
string
サービスのエンドポイント (例: https://contoso.eastus.communications.azure.net)。
- credential
-
TokenCredential
サービスへの要求を認証するために使用される オブジェクト。 AzureKeyCredential または @azure/identity
を使用して資格情報を作成します。
省略可能。 HTTP パイプラインを構成するためのオプション。
メソッドの詳細
createUser(OperationOptions)
1 人のユーザーを作成します。
function createUser(options?: OperationOptions): Promise<CommunicationUserIdentifier>
パラメーター
- options
-
OperationOptions
要求の追加オプション。
戻り値
Promise<CommunicationUserIdentifier>
createUserAndToken(TokenScope[], CreateUserAndTokenOptions)
1 人のユーザーとトークンを同時に作成します。
function createUserAndToken(scopes: TokenScope[], options?: CreateUserAndTokenOptions): Promise<CommunicationUserToken>
パラメーター
- scopes
トークンに含めるスコープ。
- options
- CreateUserAndTokenOptions
要求の追加オプション。
戻り値
Promise<CommunicationUserToken>
deleteUser(CommunicationUserIdentifier, OperationOptions)
ユーザーの失効イベントをトリガーし、そのすべてのデータを削除します。
function deleteUser(user: CommunicationUserIdentifier, options?: OperationOptions): Promise<void>
パラメーター
- user
-
CommunicationUserIdentifier
削除されるユーザー。
- options
-
OperationOptions
要求の追加オプション。
戻り値
Promise<void>
getToken(CommunicationUserIdentifier, TokenScope[], GetTokenOptions)
スコープ付きユーザー トークンを作成します。
function getToken(user: CommunicationUserIdentifier, scopes: TokenScope[], options?: GetTokenOptions): Promise<CommunicationAccessToken>
パラメーター
- user
-
CommunicationUserIdentifier
トークンが発行されているユーザー。
- scopes
トークンに含めるスコープ。
- options
- GetTokenOptions
要求の追加オプション。
戻り値
Promise<CommunicationAccessToken>
getTokenForTeamsUser(GetTokenForTeamsUserOptions)
Teams ユーザーの Azure AD アクセス トークンを、有効期限が一致する新しいコミュニケーション ID アクセス トークンと交換します。
function getTokenForTeamsUser(options: GetTokenForTeamsUserOptions): Promise<CommunicationAccessToken>
パラメーター
- options
- GetTokenForTeamsUserOptions
Teams ユーザーの Azure AD アクセス トークンを新しいコミュニケーション ID アクセス トークンと交換するために使用されるオプション。
戻り値
Promise<CommunicationAccessToken>
revokeTokens(CommunicationUserIdentifier, OperationOptions)
ユーザーに対して作成されたすべてのデータとトークンを取り消します。
function revokeTokens(user: CommunicationUserIdentifier, options?: OperationOptions): Promise<void>
パラメーター
- user
-
CommunicationUserIdentifier
トークンが取り消されているユーザー。
- options
-
OperationOptions
要求の追加オプション。
戻り値
Promise<void>