CommunicationIdentityClient class

Clientklasse für die Interaktion mit Azure Communication Services User Token Management.

Konstruktoren

CommunicationIdentityClient(string, CommunicationIdentityClientOptions)

Initialisiert eine neue Instanz der CommunicationIdentity-Klasse.

CommunicationIdentityClient(string, KeyCredential, CommunicationIdentityClientOptions)

Initialisiert eine neue Instanz der CommunicationIdentity-Klasse mit azure KeyCredential.

CommunicationIdentityClient(string, TokenCredential, CommunicationIdentityClientOptions)

Initialisiert eine neue Instanz der CommunicationIdentity-Klasse mithilfe eines TokenCredential-Elements.

Methoden

createUser(OperationOptions)

Erstellt einen einzelnen Benutzer.

createUserAndToken(TokenScope[], CreateUserAndTokenOptions)

Erstellt einen einzelnen Benutzer und ein Token gleichzeitig.

deleteUser(CommunicationUserIdentifier, OperationOptions)

Löst das Sperrereignis für den Benutzer aus und löscht alle zugehörigen Daten.

getToken(CommunicationUserIdentifier, TokenScope[], GetTokenOptions)

Erstellt ein bereichsbezogenes Benutzertoken.

getTokenForTeamsUser(GetTokenForTeamsUserOptions)

Austauscht ein Azure AD-Zugriffstoken eines Teams-Benutzers für ein neues Kommunikationsidentitäts-Zugriffstoken mit einer übereinstimmenden Ablaufzeit.

revokeTokens(CommunicationUserIdentifier, OperationOptions)

Widerruft alle Daten und Token, die für einen Benutzer erstellt wurden.

Details zum Konstruktor

CommunicationIdentityClient(string, CommunicationIdentityClientOptions)

Initialisiert eine neue Instanz der CommunicationIdentity-Klasse.

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

Parameter

connectionString

string

Verbindungszeichenfolge zum Herstellen einer Verbindung mit einer Azure Communication Service-Ressource. Beispiel: "endpoint=https://contoso.eastus.communications.azure.net/; accesskey=secret";

options
CommunicationIdentityClientOptions

Wahlfrei. Optionen zum Konfigurieren der HTTP-Pipeline.

CommunicationIdentityClient(string, KeyCredential, CommunicationIdentityClientOptions)

Initialisiert eine neue Instanz der CommunicationIdentity-Klasse mit azure KeyCredential.

new CommunicationIdentityClient(endpoint: string, credential: KeyCredential, options?: CommunicationIdentityClientOptions)

Parameter

endpoint

string

Der Endpunkt des Diensts (z. B. https://contoso.eastus.communications.azure.net).

credential
KeyCredential

Ein Objekt, das zum Authentifizieren von Anforderungen an den Dienst verwendet wird. Verwenden Sie azureKeyCredential oder @azure/identity, um anmeldeinformationen zu erstellen.

options
CommunicationIdentityClientOptions

Wahlfrei. Optionen zum Konfigurieren der HTTP-Pipeline.

CommunicationIdentityClient(string, TokenCredential, CommunicationIdentityClientOptions)

Initialisiert eine neue Instanz der CommunicationIdentity-Klasse mithilfe eines TokenCredential-Elements.

new CommunicationIdentityClient(endpoint: string, credential: TokenCredential, options?: CommunicationIdentityClientOptions)

Parameter

endpoint

string

Der Endpunkt des Diensts (z. B. https://contoso.eastus.communications.azure.net)

credential
TokenCredential

TokenAnmeldeinformationen, die zum Authentifizieren von Anforderungen an den Dienst verwendet werden.

options
CommunicationIdentityClientOptions

Wahlfrei. Optionen zum Konfigurieren der HTTP-Pipeline.

Details zur Methode

createUser(OperationOptions)

Erstellt einen einzelnen Benutzer.

function createUser(options?: OperationOptions): Promise<CommunicationUserIdentifier>

Parameter

options
OperationOptions

Zusätzliche Optionen für die Anforderung.

Gibt zurück

createUserAndToken(TokenScope[], CreateUserAndTokenOptions)

Erstellt einen einzelnen Benutzer und ein Token gleichzeitig.

function createUserAndToken(scopes: TokenScope[], options?: CreateUserAndTokenOptions): Promise<CommunicationUserToken>

Parameter

scopes

TokenScope[]

Bereiche, die in das Token eingeschlossen werden sollen.

options
CreateUserAndTokenOptions

Zusätzliche Optionen für die Anforderung.

Gibt zurück

deleteUser(CommunicationUserIdentifier, OperationOptions)

Löst das Sperrereignis für den Benutzer aus und löscht alle zugehörigen Daten.

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

Parameter

user
CommunicationUserIdentifier

Der Benutzer, der gelöscht wird.

options
OperationOptions

Zusätzliche Optionen für die Anforderung.

Gibt zurück

Promise<void>

getToken(CommunicationUserIdentifier, TokenScope[], GetTokenOptions)

Erstellt ein bereichsbezogenes Benutzertoken.

function getToken(user: CommunicationUserIdentifier, scopes: TokenScope[], options?: GetTokenOptions): Promise<CommunicationAccessToken>

Parameter

user
CommunicationUserIdentifier

Der Benutzer, dessen Token ausgegeben werden.

scopes

TokenScope[]

Bereiche, die in das Token eingeschlossen werden sollen.

options
GetTokenOptions

Zusätzliche Optionen für die Anforderung.

Gibt zurück

getTokenForTeamsUser(GetTokenForTeamsUserOptions)

Austauscht ein Azure AD-Zugriffstoken eines Teams-Benutzers für ein neues Kommunikationsidentitäts-Zugriffstoken mit einer übereinstimmenden Ablaufzeit.

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

Parameter

options
GetTokenForTeamsUserOptions

Optionen zum Austauschen eines Azure AD-Zugriffstokens eines Teams-Benutzers für ein neues Kommunikationsidentitäts-Zugriffstoken.

Gibt zurück

revokeTokens(CommunicationUserIdentifier, OperationOptions)

Widerruft alle Daten und Token, die für einen Benutzer erstellt wurden.

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

Parameter

user
CommunicationUserIdentifier

Der Benutzer, dessen Token widerrufen werden.

options
OperationOptions

Zusätzliche Optionen für die Anforderung.

Gibt zurück

Promise<void>