CommunicationIdentityAsyncClient Class
- java.
lang. Object - com.
azure. communication. identity. CommunicationIdentityAsyncClient
- com.
public final class CommunicationIdentityAsyncClient
Asynchronous client interface for Azure Communication Services Identity operations
Instantiating an asynchronous Azure Communication Service Identity Client
// You can find your endpoint and access key from your resource in the Azure Portal
String endpoint = "https://<RESOURCE_NAME>.communication.azure.com";
AzureKeyCredential keyCredential = new AzureKeyCredential("<access-key>");
CommunicationIdentityAsyncClient communicationIdentityAsyncClient = new CommunicationIdentityClientBuilder()
.endpoint(endpoint)
.credential(keyCredential)
.buildAsyncClient();
View CommunicationIdentityClientBuilder for additional ways to construct the client.
Method Summary
Methods inherited from java.lang.Object
Method Details
createUser
public Mono<CommunicationUserIdentifier> createUser()
Creates a new CommunicationUserIdentifier.
Returns:
createUserAndToken
public Mono<CommunicationUserIdentifierAndToken> createUserAndToken(Iterable<CommunicationTokenScope> scopes)
Creates a new CommunicationUserIdentifier with token.
Parameters:
Returns:
createUserAndToken
public Mono<CommunicationUserIdentifierAndToken> createUserAndToken(Iterable<CommunicationTokenScope> scopes, Duration tokenExpiresIn)
Creates a new CommunicationUserIdentifier with token.
Parameters:
Returns:
createUserAndTokenWithResponse
public Mono<Response<CommunicationUserIdentifierAndToken>> createUserAndTokenWithResponse(Iterable<CommunicationTokenScope> scopes)
Creates a new CommunicationUserIdentifier with token with response.
Parameters:
Returns:
createUserAndTokenWithResponse
public Mono<Response<CommunicationUserIdentifierAndToken>> createUserAndTokenWithResponse(Iterable<CommunicationTokenScope> scopes, Duration tokenExpiresIn)
Creates a new CommunicationUserIdentifier with token with response.
Parameters:
Returns:
createUserWithResponse
public Mono<Response<CommunicationUserIdentifier>> createUserWithResponse()
Creates a new CommunicationUserIdentifier with response.
Returns:
deleteUser
public Mono<Void> deleteUser(CommunicationUserIdentifier communicationUser)
Deletes a CommunicationUserIdentifier, revokes its tokens and deletes its data.
Parameters:
Returns:
deleteUserWithResponse
public Mono<Response<Void>> deleteUserWithResponse(CommunicationUserIdentifier communicationUser)
Deletes a CommunicationUserIdentifier, revokes its tokens and deletes its data with response.
Parameters:
Returns:
getToken
public Mono<AccessToken> getToken(CommunicationUserIdentifier communicationUser, Iterable<CommunicationTokenScope> scopes)
Gets a Communication Identity access token for a CommunicationUserIdentifier.
Parameters:
Returns:
getToken
public Mono<AccessToken> getToken(CommunicationUserIdentifier communicationUser, Iterable<CommunicationTokenScope> scopes, Duration tokenExpiresIn)
Gets a Communication Identity access token for a CommunicationUserIdentifier.
Parameters:
Returns:
getTokenForTeamsUser
public Mono<AccessToken> getTokenForTeamsUser(GetTokenForTeamsUserOptions options)
Exchanges an Azure AD access token of a Teams User for a new Communication Identity access token.
Parameters:
Returns:
getTokenForTeamsUserWithResponse
public Mono<Response<AccessToken>> getTokenForTeamsUserWithResponse(GetTokenForTeamsUserOptions options)
Exchanges an Azure AD access token of a Teams User for a new Communication Identity access token.
Parameters:
Returns:
getTokenWithResponse
public Mono<Response<AccessToken>> getTokenWithResponse(CommunicationUserIdentifier communicationUser, Iterable<CommunicationTokenScope> scopes)
Gets a Communication Identity access token for a CommunicationUserIdentifier.
Parameters:
Returns:
getTokenWithResponse
public Mono<Response<AccessToken>> getTokenWithResponse(CommunicationUserIdentifier communicationUser, Iterable<CommunicationTokenScope> scopes, Duration tokenExpiresIn)
Gets a Communication Identity access token for a CommunicationUserIdentifier.
Parameters:
Returns:
revokeTokens
public Mono<Void> revokeTokens(CommunicationUserIdentifier communicationUser)
Revokes all the tokens created for an identifier.
Parameters:
Returns:
revokeTokensWithResponse
public Mono<Response<Void>> revokeTokensWithResponse(CommunicationUserIdentifier communicationUser)
Revokes all the tokens created for an identifier with response.
Parameters:
Returns: