CommunicationIdentityClient Class

  • java.lang.Object
    • com.azure.communication.administration.CommunicationIdentityClient

public final class CommunicationIdentityClient

Synchronous client interface for Communication Service identity operations

Method Summary

Modifier and Type Method and Description
com.azure.communication.common.CommunicationUser createUser()

Creates a new CommunicationUser.

Response<com.azure.communication.common.CommunicationUser> createUserWithResponse(Context context)

Creates a new CommunicationUser.

void deleteUser(CommunicationUser communicationUser)

Deletes a CommunicationUser, revokes its tokens and deletes its data.

Response<Void> deleteUserWithResponse(CommunicationUser communicationUser, Context context)

Deletes a CommunicationUser, revokes its tokens and deletes its data.

CommunicationUserToken issueToken(CommunicationUser communicationUser, List<String> scopes)

Generates a new token for an identity.

Response<CommunicationUserToken> issueTokenWithResponse(CommunicationUser communicationUser, List<String> scopes, Context context)

Generates a new token for an identity.

void revokeTokens(CommunicationUser communicationUser, OffsetDateTime issuedBefore)

Revokes all the tokens created for a user before a specific date.

Response<Void> revokeTokensWithResponse(CommunicationUser communicationUser, OffsetDateTime issuedBefore, Context context)

Revokes all the tokens created for a user before a specific date.

Methods inherited from java.lang.Object

Method Details

createUser

public CommunicationUser createUser()

Creates a new CommunicationUser.

Returns:

the created Communication User.

createUserWithResponse

public Response<CommunicationUser> createUserWithResponse(Context context)

Creates a new CommunicationUser.

Parameters:

context - the context of the request. Can also be null or Context.NONE.

Returns:

the created Communication User.

deleteUser

public void deleteUser(CommunicationUser communicationUser)

Deletes a CommunicationUser, revokes its tokens and deletes its data.

Parameters:

communicationUser - The user to be deleted.

deleteUserWithResponse

public Response<Void> deleteUserWithResponse(CommunicationUser communicationUser, Context context)

Deletes a CommunicationUser, revokes its tokens and deletes its data.

Parameters:

communicationUser - The user to be deleted.
context - the context of the request. Can also be null or Context.NONE.

Returns:

the response.

issueToken

public CommunicationUserToken issueToken(CommunicationUser communicationUser, List<String> scopes)

Generates a new token for an identity.

Parameters:

communicationUser - The CommunicationUser from whom to issue a token.
scopes - The scopes that the token should have.

Returns:

the created CommunicationUserToken.

issueTokenWithResponse

public Response<CommunicationUserToken> issueTokenWithResponse(CommunicationUser communicationUser, List<String> scopes, Context context)

Generates a new token for an identity.

Parameters:

communicationUser - The CommunicationUser from whom to issue a token.
scopes - The scopes that the token should have.
context - the context of the request. Can also be null or Context.NONE.

Returns:

the created CommunicationUserToken.

revokeTokens

public void revokeTokens(CommunicationUser communicationUser, OffsetDateTime issuedBefore)

Revokes all the tokens created for a user before a specific date.

Parameters:

communicationUser - The CommunicationUser whose tokens will be revoked.
issuedBefore - All tokens that are issued prior to this time should get revoked.

revokeTokensWithResponse

public Response<Void> revokeTokensWithResponse(CommunicationUser communicationUser, OffsetDateTime issuedBefore, Context context)

Revokes all the tokens created for a user before a specific date.

Parameters:

communicationUser - The CommunicationUser whose tokens will be revoked.
issuedBefore - All tokens that are issued prior to this time should get revoked.
context - the context of the request. Can also be null or Context.NONE.

Returns:

the response.

Applies to