次の方法で共有


CommunicationIdentityClient class

ユーザー トークン管理を操作するためのクライアント クラスAzure Communication Services。

コンストラクター

CommunicationIdentityClient(string, CommunicationIdentityClientOptions)

CommunicationIdentity クラスの新しいインスタンスを初期化します。

CommunicationIdentityClient(string, KeyCredential, CommunicationIdentityClientOptions)

Azure KeyCredential を使用して CommunicationIdentity クラスの新しいインスタンスを初期化します。

CommunicationIdentityClient(string, TokenCredential, CommunicationIdentityClientOptions)

TokenCredential を使用して CommunicationIdentity クラスの新しいインスタンスを初期化します。

メソッド

createUser(OperationOptions)

1 人のユーザーを作成します。

createUserAndToken(TokenScope[], CreateUserAndTokenOptions)

1 人のユーザーとトークンを同時に作成します。

deleteUser(CommunicationUserIdentifier, OperationOptions)

ユーザーの失効イベントをトリガーし、そのすべてのデータを削除します。

getToken(CommunicationUserIdentifier, TokenScope[], GetTokenOptions)

スコープ付きユーザー トークンを作成します。

getTokenForTeamsUser(GetTokenForTeamsUserOptions)

Teams ユーザーの Azure AD アクセス トークンを、有効期限が一致する新しいコミュニケーション ID アクセス トークンと交換します。

revokeTokens(CommunicationUserIdentifier, OperationOptions)

ユーザーに対して作成されたすべてのデータとトークンを取り消します。

コンストラクターの詳細

CommunicationIdentityClient(string, CommunicationIdentityClientOptions)

CommunicationIdentity クラスの新しいインスタンスを初期化します。

new CommunicationIdentityClient(connectionString: string, options?: CommunicationIdentityClientOptions)

パラメーター

connectionString

string

Azure Communication Service リソースに接続するための接続文字列。 例: "endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret";

options
CommunicationIdentityClientOptions

省略可能。 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 を使用して資格情報を作成します。

options
CommunicationIdentityClientOptions

任意。 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 を使用して資格情報を作成します。

options
CommunicationIdentityClientOptions

省略可能。 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

TokenScope[]

トークンに含めるスコープ。

options
CreateUserAndTokenOptions

要求の追加オプション。

戻り値

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

TokenScope[]

トークンに含めるスコープ。

options
GetTokenOptions

要求の追加オプション。

戻り値

getTokenForTeamsUser(GetTokenForTeamsUserOptions)

Teams ユーザーの Azure AD アクセス トークンを、有効期限が一致する新しいコミュニケーション ID アクセス トークンと交換します。

function getTokenForTeamsUser(options: GetTokenForTeamsUserOptions): Promise<CommunicationAccessToken>

パラメーター

options
GetTokenForTeamsUserOptions

Teams ユーザーの Azure AD アクセス トークンを新しいコミュニケーション ID アクセス トークンと交換するために使用されるオプション。

戻り値

revokeTokens(CommunicationUserIdentifier, OperationOptions)

ユーザーに対して作成されたすべてのデータとトークンを取り消します。

function revokeTokens(user: CommunicationUserIdentifier, options?: OperationOptions): Promise<void>

パラメーター

user

CommunicationUserIdentifier

トークンが取り消されているユーザー。

options

OperationOptions

要求の追加オプション。

戻り値

Promise<void>