CommunicationIdentityClient class
Azure Communication Services 사용자 토큰 관리와 상호 작용하기 위한 클라이언트 클래스입니다.
생성자
Communication |
CommunicationIdentity 클래스의 새 인스턴스를 초기화합니다. |
Communication |
Azure KeyCredential을 사용하여 CommunicationIdentity 클래스의 새 인스턴스를 초기화합니다. |
Communication |
TokenCredential을 사용하여 CommunicationIdentity 클래스의 새 인스턴스를 초기화합니다. |
메서드
create |
단일 사용자를 만듭니다. |
create |
단일 사용자와 토큰을 동시에 만듭니다. |
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
서비스에 대한 요청을 인증하는 데 사용되는 TokenCredential입니다.
(선택 사항) HTTP 파이프라인을 구성하는 옵션입니다.
메서드 세부 정보
createUser(OperationOptions)
단일 사용자를 만듭니다.
function createUser(options?: OperationOptions): Promise<CommunicationUserIdentifier>
매개 변수
- options
- OperationOptions
요청에 대한 추가 옵션입니다.
반환
Promise<CommunicationUserIdentifier>
createUserAndToken(TokenScope[], CreateUserAndTokenOptions)
단일 사용자와 토큰을 동시에 만듭니다.
function createUserAndToken(scopes: TokenScope[], options?: CreateUserAndTokenOptions): Promise<CommunicationUserToken>
매개 변수
- scopes
토큰에 포함할 범위입니다.
- options
- CreateUserAndTokenOptions
요청에 대한 추가 옵션입니다.
반환
Promise<CommunicationUserToken>
deleteUser(CommunicationUserIdentifier, OperationOptions)
사용자에 대한 해지 이벤트를 트리거하고 모든 데이터를 삭제합니다.
function deleteUser(user: CommunicationUserIdentifier, options?: OperationOptions): Promise<void>
매개 변수
삭제되는 사용자입니다.
- options
- OperationOptions
요청에 대한 추가 옵션입니다.
반환
Promise<void>
getToken(CommunicationUserIdentifier, TokenScope[], GetTokenOptions)
범위가 지정된 사용자 토큰을 만듭니다.
function getToken(user: CommunicationUserIdentifier, scopes: TokenScope[], options?: GetTokenOptions): Promise<CommunicationAccessToken>
매개 변수
토큰이 발급되는 사용자입니다.
- scopes
토큰에 포함할 범위입니다.
- options
- GetTokenOptions
요청에 대한 추가 옵션입니다.
반환
Promise<CommunicationAccessToken>
getTokenForTeamsUser(GetTokenForTeamsUserOptions)
Teams 사용자의 Azure AD 액세스 토큰을 일치하는 만료 시간으로 새 통신 ID 액세스 토큰으로 교환합니다.
function getTokenForTeamsUser(options: GetTokenForTeamsUserOptions): Promise<CommunicationAccessToken>
매개 변수
- options
- GetTokenForTeamsUserOptions
Teams 사용자의 Azure AD 액세스 토큰을 새 Communication Identity 액세스 토큰으로 교환하는 데 사용되는 옵션입니다.
반환
Promise<CommunicationAccessToken>
revokeTokens(CommunicationUserIdentifier, OperationOptions)
사용자에 대해 만든 모든 데이터 및 토큰을 취소합니다.
function revokeTokens(user: CommunicationUserIdentifier, options?: OperationOptions): Promise<void>
매개 변수
토큰이 해지되는 사용자입니다.
- options
- OperationOptions
요청에 대한 추가 옵션입니다.
반환
Promise<void>