From 3736b990f39f28425d015833d70d8e8f33712dca Mon Sep 17 00:00:00 2001 From: Aigerim Date: Wed, 20 Oct 2021 09:33:36 +0200 Subject: [PATCH] Latest API(2021-10-31-preview) changes implementation in azure-communication-identity (#24574) * exchange teams token added to the client classes * exchange teams token live tests are added for sync&async clients * README, CHANGELOG, and samples are updated * Fixed Checkstyle violations * http recordings are updated * azure-core version fix * decreased branchcoverage value * PR comments fix * live tests recordings are updated for 1.2.0-beta.1 version * new V2021_10_31_PREVIEW version added, regenerated api implementation * provided stable api version for CommunicationIdentityClientBuilder in networktraversal tests * title for exchangeTeamsToken changed in terms of consistency in README.md * updatet description of features added in CHANGELOG.md * generating teams token is added to the samples * fix checkstyle failure Co-authored-by: Aigerim Beishenbekova --- .../chat/ChatClientTestBase.java | 2 + .../azure-communication-identity/CHANGELOG.md | 1 + .../azure-communication-identity/README.md | 13 +- .../azure-communication-identity/pom.xml | 2 +- .../CommunicationIdentityAsyncClient.java | 53 +++- .../identity/CommunicationIdentityClient.java | 50 +++- .../CommunicationIdentityClientBuilder.java | 6 +- .../CommunicationIdentityServiceVersion.java | 7 +- ....java => CommunicationIdentitiesImpl.java} | 242 ++++++++++++++---- .../CommunicationIdentityClientImpl.java | 61 ++++- ...ommunicationIdentityClientImplBuilder.java | 176 ++++++++++++- .../models/CommunicationError.java | 19 +- .../models/CommunicationErrorResponse.java | 2 +- .../models/CommunicationIdentity.java | 2 +- .../CommunicationIdentityAccessToken.java | 2 +- ...ommunicationIdentityAccessTokenResult.java | 2 +- .../models/TeamsUserAccessTokenRequest.java | 39 +++ .../identity/implementation/package-info.java | 5 +- .../communication/identity/ReadmeSamples.java | 47 ++++ .../CommunicationIdentityAsyncTests.java | 155 +++++++++-- .../CommunicationIdentityClientTestBase.java | 67 ++++- .../identity/CommunicationIdentityTests.java | 183 ++++++++++--- ...dentityClientUsingConnectionString[1].json | 24 +- ...IdentityClientUsingManagedIdentity[1].json | 24 +- ...sts.createUserAndTokenWithResponse[1].json | 24 +- ...ntityAsyncTests.createUserAndToken[1].json | 24 +- ...serWithContextUsingManagedIdentity[1].json | 24 +- ...erWithResponseUsingManagedIdentity[1].json | 24 +- ...yAsyncTests.createUserWithResponse[1].json | 24 +- ...ationIdentityAsyncTests.createUser[1].json | 24 +- ...sts.deleteUserUsingManagedIdentity[1].json | 42 +-- ...erWithResponseUsingManagedIdentity[1].json | 42 +-- ...yAsyncTests.deleteUserWithResponse[1].json | 42 +-- ...ationIdentityAsyncTests.deleteUser[1].json | 42 +-- ...angeTeamsTokenUsingManagedIdentity[1].json | 29 +++ ...s.exchangeTeamsTokenWithEmptyToken[1].json | 28 ++ ...exchangeTeamsTokenWithInvalidToken[1].json | 28 ++ ...ncTests.exchangeTeamsTokenWithNull[1].json | 28 ++ ...enWithResponseUsingManagedIdentity[1].json | 29 +++ ...sts.exchangeTeamsTokenWithResponse[1].json | 29 +++ ...ntityAsyncTests.exchangeTeamsToken[1].json | 29 +++ ...Tests.getTokenUsingManagedIdentity[1].json | 46 ++-- ...enWithResponseUsingManagedIdentity[1].json | 46 ++-- ...ityAsyncTests.getTokenWithResponse[1].json | 46 ++-- ...icationIdentityAsyncTests.getToken[1].json | 46 ++-- ...ts.revokeTokenUsingManagedIdentity[1].json | 64 ++--- ...enWithResponseUsingManagedIdentity[1].json | 64 ++--- ...AsyncTests.revokeTokenWithResponse[1].json | 64 ++--- ...tionIdentityAsyncTests.revokeToken[1].json | 64 ++--- ...dentityClientUsingConnectionString[1].json | 24 +- ...IdentityClientUsingManagedIdentity[1].json | 24 +- ...serAndTokenWithResponseNullContext[1].json | 24 +- ...sts.createUserAndTokenWithResponse[1].json | 24 +- ...onIdentityTests.createUserAndToken[1].json | 24 +- ...erWithResponseUsingManagedIdentity[1].json | 24 +- ...entityTests.createUserWithResponse[1].json | 24 +- ...municationIdentityTests.createUser[1].json | 24 +- ...sts.deleteUserUsingManagedIdentity[1].json | 42 +-- ...erWithResponseUsingManagedIdentity[1].json | 42 +-- ...eteUserWithResponseWithNullContext[1].json | 42 +-- ...entityTests.deleteUserWithResponse[1].json | 42 +-- ...municationIdentityTests.deleteUser[1].json | 42 +-- ...angeTeamsTokenUsingManagedIdentity[1].json | 29 +++ ...s.exchangeTeamsTokenWithEmptyToken[1].json | 28 ++ ...exchangeTeamsTokenWithExpiredToken[1].json | 28 ++ ...exchangeTeamsTokenWithInvalidToken[1].json | 28 ++ ...tyTests.exchangeTeamsTokenWithNull[1].json | 28 ++ ...enWithResponseUsingManagedIdentity[1].json | 29 +++ ...amsTokenWithValidTokenWithResponse[1].json | 29 +++ ...s.exchangeTeamsTokenWithValidToken[1].json | 29 +++ ...Tests.getTokenUsingManagedIdentity[1].json | 46 ++-- ...ts.getTokenWithResponseNullContext[1].json | 46 ++-- ...enWithResponseUsingManagedIdentity[1].json | 46 ++-- ...IdentityTests.getTokenWithResponse[1].json | 46 ++-- ...ommunicationIdentityTests.getToken[1].json | 46 ++-- ...ts.revokeTokenUsingManagedIdentity[1].json | 64 ++--- ...revokeTokenWithResponseNullContext[1].json | 64 ++--- ...enWithResponseUsingManagedIdentity[1].json | 64 ++--- ...ntityTests.revokeTokenWithResponse[1].json | 64 ++--- ...unicationIdentityTests.revokeToken[1].json | 64 ++--- .../swagger/README.md | 8 +- .../CommunicationRelayClientTestBase.java | 3 + 82 files changed, 2284 insertions(+), 1043 deletions(-) rename sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/{CommunicationIdentityImpl.java => CommunicationIdentitiesImpl.java} (66%) create mode 100644 sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/TeamsUserAccessTokenRequest.java create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenUsingManagedIdentity[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithEmptyToken[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithInvalidToken[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithNull[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithResponseUsingManagedIdentity[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithResponse[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsToken[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenUsingManagedIdentity[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithEmptyToken[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithExpiredToken[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithInvalidToken[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithNull[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithResponseUsingManagedIdentity[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithValidTokenWithResponse[1].json create mode 100644 sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithValidToken[1].json diff --git a/sdk/communication/azure-communication-chat/src/test/java/com/azure/communication/chat/ChatClientTestBase.java b/sdk/communication/azure-communication-chat/src/test/java/com/azure/communication/chat/ChatClientTestBase.java index 1df05fdd4ca80..e6fe60d1f484f 100644 --- a/sdk/communication/azure-communication-chat/src/test/java/com/azure/communication/chat/ChatClientTestBase.java +++ b/sdk/communication/azure-communication-chat/src/test/java/com/azure/communication/chat/ChatClientTestBase.java @@ -7,6 +7,7 @@ import com.azure.communication.identity.CommunicationIdentityClientBuilder; import com.azure.communication.chat.models.*; import com.azure.communication.common.CommunicationTokenCredential; +import com.azure.communication.identity.CommunicationIdentityServiceVersion; import com.azure.core.credential.AzureKeyCredential; import com.azure.core.exception.HttpResponseException; import com.azure.core.http.HttpClient; @@ -105,6 +106,7 @@ protected CommunicationIdentityClientBuilder getCommunicationIdentityClientBuild CommunicationIdentityClientBuilder builder = new CommunicationIdentityClientBuilder(); builder.endpoint(ENDPOINT) .credential(new AzureKeyCredential(ACCESS_KEY)) + .serviceVersion(CommunicationIdentityServiceVersion.V2021_03_07) .httpClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient); if (getTestMode() == TestMode.RECORD) { diff --git a/sdk/communication/azure-communication-identity/CHANGELOG.md b/sdk/communication/azure-communication-identity/CHANGELOG.md index e308972990601..d44790175afb5 100644 --- a/sdk/communication/azure-communication-identity/CHANGELOG.md +++ b/sdk/communication/azure-communication-identity/CHANGELOG.md @@ -3,6 +3,7 @@ ## 1.2.0-beta.1 (Unreleased) ### Features Added +- Added support for Microsoft 365 Teams identities ### Breaking Changes diff --git a/sdk/communication/azure-communication-identity/README.md b/sdk/communication/azure-communication-identity/README.md index a3ab2ca8b8cbd..73ad2d7fd8151 100644 --- a/sdk/communication/azure-communication-identity/README.md +++ b/sdk/communication/azure-communication-identity/README.md @@ -126,7 +126,7 @@ System.out.println("User id: " + user.getId()); ### Getting a token for an existing user Use the `getToken` function to get a token for an existing user. The function -also takes in a list of `CommunicationIdentityTokenScope`. Scope options include: +also takes in a list of `CommunicationTokenScope`. Scope options include: - `chat` (Chat) - `voip` (Voice over IP) @@ -170,10 +170,19 @@ Use the `deleteUser` function to delete a user. communicationIdentityClient.deleteUser(user); ``` +### Exchanging AAD access token of a Teams User for a Communication Identity access token +Use the `exchangeTeamsToken` function to exchanges an AAD access token of a Teams User for a new Communication Identity access token. + + +```java +// exchanges an AAD access token of a Teams User for a new Communication Identity access token. +communicationIdentityClient.exchangeTeamsToken(accessTokenAAD); +``` + ## Troubleshooting All user token service operations will throw an exception on failure. - + ```java try { CommunicationUserIdentifier user = communicationIdentityClient.createUser(); diff --git a/sdk/communication/azure-communication-identity/pom.xml b/sdk/communication/azure-communication-identity/pom.xml index 22f72cbe5465a..d00e7f609c3ff 100644 --- a/sdk/communication/azure-communication-identity/pom.xml +++ b/sdk/communication/azure-communication-identity/pom.xml @@ -50,7 +50,7 @@ src/main src/test 0.88 - 0.70 + 0.67 false diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityAsyncClient.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityAsyncClient.java index 37155ecea4a98..9b89f6c6fa5ff 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityAsyncClient.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityAsyncClient.java @@ -3,14 +3,15 @@ package com.azure.communication.identity; +import com.azure.communication.identity.implementation.CommunicationIdentitiesImpl; import com.azure.communication.identity.implementation.CommunicationIdentityClientImpl; -import com.azure.communication.identity.implementation.CommunicationIdentityImpl; import com.azure.communication.identity.implementation.converters.IdentityErrorConverter; import com.azure.communication.identity.implementation.models.CommunicationErrorResponseException; -import com.azure.communication.identity.implementation.models.CommunicationIdentityAccessToken; import com.azure.communication.identity.implementation.models.CommunicationIdentityAccessTokenRequest; import com.azure.communication.identity.implementation.models.CommunicationIdentityAccessTokenResult; import com.azure.communication.identity.implementation.models.CommunicationIdentityCreateRequest; +import com.azure.communication.identity.implementation.models.CommunicationIdentityAccessToken; +import com.azure.communication.identity.implementation.models.TeamsUserAccessTokenRequest; import com.azure.communication.identity.models.CommunicationTokenScope; import com.azure.communication.identity.models.CommunicationUserIdentifierAndToken; import com.azure.communication.identity.models.IdentityError; @@ -40,11 +41,11 @@ @ServiceClient(builder = CommunicationIdentityClientBuilder.class, isAsync = true) public final class CommunicationIdentityAsyncClient { - private final CommunicationIdentityImpl client; + private final CommunicationIdentitiesImpl client; private final ClientLogger logger = new ClientLogger(CommunicationIdentityAsyncClient.class); CommunicationIdentityAsyncClient(CommunicationIdentityClientImpl communicationIdentityServiceClient) { - client = communicationIdentityServiceClient.getCommunicationIdentity(); + client = communicationIdentityServiceClient.getCommunicationIdentities(); } /** @@ -281,4 +282,48 @@ private IdentityErrorResponseException translateException(CommunicationErrorResp } return new IdentityErrorResponseException(exception.getMessage(), exception.getResponse(), error); } + + /** + * Exchanges an AAD access token of a Teams User for a new Communication Identity access token. + * + * @param accessTokenAAD AAD access token of a Teams User to acquire Communication Identity access token. + * @return Communication Identity access token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono exchangeTeamsToken(String accessTokenAAD) { + try { + TeamsUserAccessTokenRequest requestBody = new TeamsUserAccessTokenRequest(); + requestBody.setToken(accessTokenAAD); + return client.exchangeTeamsUserAccessTokenAsync(requestBody) + .onErrorMap(CommunicationErrorResponseException.class, e -> translateException(e)) + .flatMap((CommunicationIdentityAccessToken rawToken) -> { + return Mono.just(new AccessToken(rawToken.getToken(), rawToken.getExpiresOn())); + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + + /** + * Exchanges an AAD access token of a Teams User for a new Communication Identity access token. + * + * @param accessTokenAAD AAD access token of a Teams User to acquire Communication Identity access token. + * @return Communication Identity access token with response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> exchangeTeamsTokenWithResponse(String accessTokenAAD) { + try { + TeamsUserAccessTokenRequest requestBody = new TeamsUserAccessTokenRequest(); + requestBody.setToken(accessTokenAAD); + return client.exchangeTeamsUserAccessTokenWithResponseAsync(requestBody) + .onErrorMap(CommunicationErrorResponseException.class, e -> translateException(e)) + .flatMap((Response response) -> { + AccessToken token = new AccessToken(response.getValue().getToken(), response.getValue().getExpiresOn()); + return Mono.just(new SimpleResponse(response, token)); + }); + } catch (RuntimeException ex) { + return monoError(logger, ex); + } + } + } diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityClient.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityClient.java index 3d1587e88c123..365ac9c6d0fe9 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityClient.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityClient.java @@ -8,12 +8,13 @@ import java.util.stream.Collectors; import java.util.stream.StreamSupport; +import com.azure.communication.identity.implementation.CommunicationIdentitiesImpl; import com.azure.communication.identity.implementation.CommunicationIdentityClientImpl; -import com.azure.communication.identity.implementation.CommunicationIdentityImpl; -import com.azure.communication.identity.implementation.models.CommunicationIdentityAccessToken; import com.azure.communication.identity.implementation.models.CommunicationIdentityAccessTokenRequest; import com.azure.communication.identity.implementation.models.CommunicationIdentityAccessTokenResult; import com.azure.communication.identity.implementation.models.CommunicationIdentityCreateRequest; +import com.azure.communication.identity.implementation.models.CommunicationIdentityAccessToken; +import com.azure.communication.identity.implementation.models.TeamsUserAccessTokenRequest; import com.azure.communication.identity.models.CommunicationTokenScope; import com.azure.communication.identity.models.CommunicationUserIdentifierAndToken; import com.azure.communication.common.CommunicationUserIdentifier; @@ -32,11 +33,11 @@ @ServiceClient(builder = CommunicationIdentityClientBuilder.class, isAsync = false) public final class CommunicationIdentityClient { - private final CommunicationIdentityImpl client; + private final CommunicationIdentitiesImpl client; private final ClientLogger logger = new ClientLogger(CommunicationIdentityClient.class); CommunicationIdentityClient(CommunicationIdentityClientImpl communicationIdentityClient) { - client = communicationIdentityClient.getCommunicationIdentity(); + client = communicationIdentityClient.getCommunicationIdentities(); } /** @@ -225,4 +226,45 @@ private CommunicationUserIdentifierAndToken userWithAccessTokenResultConverter( return new CommunicationUserIdentifierAndToken(user, token); } + + /** + * Exchanges an AAD access token of a Teams User for a new Communication Identity access token. + * + * @param accessTokenAAD AAD access token of a Teams User to acquire Communication Identity access token. + * @return Communication Identity access token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AccessToken exchangeTeamsToken(String accessTokenAAD) { + TeamsUserAccessTokenRequest requestBody = new TeamsUserAccessTokenRequest(); + requestBody.setToken(accessTokenAAD); + CommunicationIdentityAccessToken rawToken = client.exchangeTeamsUserAccessToken(requestBody); + return new AccessToken(rawToken.getToken(), rawToken.getExpiresOn()); + } + + /** + * Exchanges an AAD access token of a Teams User for a new Communication Identity access token. + * + * @param accessTokenAAD AAD access token of a Teams User to acquire Communication Identity access token. + * @param context the context of the request. Can also be null or + * Context.NONE. + * @return Communication Identity access token with response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response exchangeTeamsTokenWithResponse(String accessTokenAAD, Context context) { + context = context == null ? Context.NONE : context; + TeamsUserAccessTokenRequest requestBody = new TeamsUserAccessTokenRequest(); + requestBody.setToken(accessTokenAAD); + Response response = client.exchangeTeamsUserAccessTokenWithResponseAsync(requestBody, context) + .block(); + if (response == null || response.getValue() == null) { + throw logger.logExceptionAsError(new IllegalStateException("Service failed to return a response or expected value.")); + } + + return new SimpleResponse( + response, + new AccessToken(response.getValue().getToken(), response.getValue().getExpiresOn())); + } + + + } diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityClientBuilder.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityClientBuilder.java index 116c2547db2e8..beba4cc6f4041 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityClientBuilder.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityClientBuilder.java @@ -54,7 +54,7 @@ public final class CommunicationIdentityClientBuilder { private ClientOptions clientOptions; private final Map properties = CoreUtils.getProperties(COMMUNICATION_IDENTITY_PROPERTIES); private final List customPolicies = new ArrayList(); - + private CommunicationIdentityServiceVersion serviceVersion; /** * Set endpoint of the service * @@ -202,6 +202,7 @@ public CommunicationIdentityClientBuilder retryPolicy(RetryPolicy retryPolicy) { * @return the updated CommunicationIdentityClientBuilder object */ public CommunicationIdentityClientBuilder serviceVersion(CommunicationIdentityServiceVersion version) { + this.serviceVersion = version; return this; } @@ -237,8 +238,11 @@ private CommunicationIdentityClientImpl createServiceImpl() { customPolicies); } + CommunicationIdentityServiceVersion apiVersion = serviceVersion != null ? serviceVersion : CommunicationIdentityServiceVersion.getLatest(); + CommunicationIdentityClientImplBuilder clientBuilder = new CommunicationIdentityClientImplBuilder(); clientBuilder.endpoint(endpoint) + .apiVersion(apiVersion.getVersion()) .pipeline(builderPipeline); return clientBuilder.buildClient(); diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityServiceVersion.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityServiceVersion.java index 0adaea820d338..b7254b79332bc 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityServiceVersion.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/CommunicationIdentityServiceVersion.java @@ -9,7 +9,8 @@ * The versions of Communication Identity Service supported by this client library. */ public enum CommunicationIdentityServiceVersion implements ServiceVersion { - V2021_03_07("2021-03-07"); + V2021_03_07("2021-03-07"), + V2021_10_31_PREVIEW("2021-10-31-preview"); private final String version; @@ -23,7 +24,6 @@ public enum CommunicationIdentityServiceVersion implements ServiceVersion { */ @Override public String getVersion() { - return this.version; } @@ -33,7 +33,6 @@ public String getVersion() { * @return the latest {@link CommunicationIdentityServiceVersion} */ public static CommunicationIdentityServiceVersion getLatest() { - - return V2021_03_07; + return V2021_10_31_PREVIEW; } } diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentityImpl.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentitiesImpl.java similarity index 66% rename from sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentityImpl.java rename to sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentitiesImpl.java index b4c60304f8023..307ccd7a391ca 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentityImpl.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentitiesImpl.java @@ -9,9 +9,11 @@ import com.azure.communication.identity.implementation.models.CommunicationIdentityAccessTokenRequest; import com.azure.communication.identity.implementation.models.CommunicationIdentityAccessTokenResult; import com.azure.communication.identity.implementation.models.CommunicationIdentityCreateRequest; +import com.azure.communication.identity.implementation.models.TeamsUserAccessTokenRequest; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; @@ -27,31 +29,33 @@ import com.azure.core.util.FluxUtil; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CommunicationIdentity. */ -public final class CommunicationIdentityImpl { +/** An instance of this class provides access to all the operations defined in CommunicationIdentities. */ +public final class CommunicationIdentitiesImpl { /** The proxy service used to perform REST calls. */ - private final CommunicationIdentityService service; + private final CommunicationIdentitiesService service; /** The service client containing this operation class. */ private final CommunicationIdentityClientImpl client; /** - * Initializes an instance of CommunicationIdentityImpl. + * Initializes an instance of CommunicationIdentitiesImpl. * * @param client the instance of the service client containing this operation class. */ - CommunicationIdentityImpl(CommunicationIdentityClientImpl client) { - this.service = RestProxy.create(CommunicationIdentityService.class, client.getHttpPipeline()); + CommunicationIdentitiesImpl(CommunicationIdentityClientImpl client) { + this.service = + RestProxy.create( + CommunicationIdentitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for CommunicationIdentityClientCommunicationIdentity to be used by the + * The interface defining all the services for CommunicationIdentityClientCommunicationIdentities to be used by the * proxy service to perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "CommunicationIdentity") - private interface CommunicationIdentityService { + @ServiceInterface(name = "CommunicationIdentit") + private interface CommunicationIdentitiesService { @Post("/identities") @ExpectedResponses({201}) @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) @@ -59,6 +63,7 @@ Mono> create( @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CommunicationIdentityCreateRequest body, + @HeaderParam("Accept") String accept, Context context); @Delete("/identities/{id}") @@ -68,6 +73,7 @@ Mono> delete( @HostParam("endpoint") String endpoint, @PathParam("id") String id, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); @Post("/identities/{id}/:revokeAccessTokens") @@ -77,6 +83,17 @@ Mono> revokeAccessTokens( @HostParam("endpoint") String endpoint, @PathParam("id") String id, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Post("/teamsUser/:exchangeAccessToken") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono> exchangeTeamsUserAccessToken( + @HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") TeamsUserAccessTokenRequest body, + @HeaderParam("Accept") String accept, Context context); @Post("/identities/{id}/:issueAccessToken") @@ -87,13 +104,15 @@ Mono> issueAccessToken( @PathParam("id") String id, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CommunicationIdentityAccessTokenRequest body, + @HeaderParam("Accept") String accept, Context context); } /** - * Create a new identity. + * Create a new identity, and optionally, an access token. * - * @param body The body parameter. + * @param body If specified, creates also a Communication Identity access token associated with the identity and + * containing the requested scopes. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -102,14 +121,17 @@ Mono> issueAccessToken( @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createWithResponseAsync( CommunicationIdentityCreateRequest body) { + final String accept = "application/json"; return FluxUtil.withContext( - context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), body, context)); + context -> + service.create(this.client.getEndpoint(), this.client.getApiVersion(), body, accept, context)); } /** - * Create a new identity. + * Create a new identity, and optionally, an access token. * - * @param body The body parameter. + * @param body If specified, creates also a Communication Identity access token associated with the identity and + * containing the requested scopes. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. @@ -119,13 +141,15 @@ public Mono> createWithResponse @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createWithResponseAsync( CommunicationIdentityCreateRequest body, Context context) { - return service.create(this.client.getEndpoint(), this.client.getApiVersion(), body, context); + final String accept = "application/json"; + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), body, accept, context); } /** - * Create a new identity. + * Create a new identity, and optionally, an access token. * - * @param body The body parameter. + * @param body If specified, creates also a Communication Identity access token associated with the identity and + * containing the requested scopes. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -145,9 +169,10 @@ public Mono createAsync(CommunicationIde } /** - * Create a new identity. + * Create a new identity, and optionally, an access token. * - * @param body The body parameter. + * @param body If specified, creates also a Communication Identity access token associated with the identity and + * containing the requested scopes. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. @@ -169,9 +194,10 @@ public Mono createAsync( } /** - * Create a new identity. + * Create a new identity, and optionally, an access token. * - * @param body The body parameter. + * @param body If specified, creates also a Communication Identity access token associated with the identity and + * containing the requested scopes. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -183,9 +209,10 @@ public CommunicationIdentityAccessTokenResult create(CommunicationIdentityCreate } /** - * Create a new identity. + * Create a new identity, and optionally, an access token. * - * @param body The body parameter. + * @param body If specified, creates also a Communication Identity access token associated with the identity and + * containing the requested scopes. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. @@ -193,8 +220,9 @@ public CommunicationIdentityAccessTokenResult create(CommunicationIdentityCreate * @return a communication identity with access token. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommunicationIdentityAccessTokenResult create(CommunicationIdentityCreateRequest body, Context context) { - return createAsync(body, context).block(); + public Response createWithResponse( + CommunicationIdentityCreateRequest body, Context context) { + return createWithResponseAsync(body, context).block(); } /** @@ -208,8 +236,9 @@ public CommunicationIdentityAccessTokenResult create(CommunicationIdentityCreate */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String id) { + final String accept = "application/json"; return FluxUtil.withContext( - context -> service.delete(this.client.getEndpoint(), id, this.client.getApiVersion(), context)); + context -> service.delete(this.client.getEndpoint(), id, this.client.getApiVersion(), accept, context)); } /** @@ -224,7 +253,8 @@ public Mono> deleteWithResponseAsync(String id) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String id, Context context) { - return service.delete(this.client.getEndpoint(), id, this.client.getApiVersion(), context); + final String accept = "application/json"; + return service.delete(this.client.getEndpoint(), id, this.client.getApiVersion(), accept, context); } /** @@ -277,10 +307,11 @@ public void delete(String id) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String id, Context context) { - deleteAsync(id, context).block(); + public Response deleteWithResponse(String id, Context context) { + return deleteWithResponseAsync(id, context).block(); } /** @@ -294,10 +325,11 @@ public void delete(String id, Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> revokeAccessTokensWithResponseAsync(String id) { + final String accept = "application/json"; return FluxUtil.withContext( context -> service.revokeAccessTokens( - this.client.getEndpoint(), id, this.client.getApiVersion(), context)); + this.client.getEndpoint(), id, this.client.getApiVersion(), accept, context)); } /** @@ -312,7 +344,8 @@ public Mono> revokeAccessTokensWithResponseAsync(String id) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> revokeAccessTokensWithResponseAsync(String id, Context context) { - return service.revokeAccessTokens(this.client.getEndpoint(), id, this.client.getApiVersion(), context); + final String accept = "application/json"; + return service.revokeAccessTokens(this.client.getEndpoint(), id, this.client.getApiVersion(), accept, context); } /** @@ -365,17 +398,137 @@ public void revokeAccessTokens(String id) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response revokeAccessTokensWithResponse(String id, Context context) { + return revokeAccessTokensWithResponseAsync(id, context).block(); + } + + /** + * Exchange an AAD access token of a Teams user for a new Communication Identity access token with a matching + * expiration time. + * + * @param body AAD access token of a Teams user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an access token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> exchangeTeamsUserAccessTokenWithResponseAsync( + TeamsUserAccessTokenRequest body) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> + service.exchangeTeamsUserAccessToken( + this.client.getEndpoint(), this.client.getApiVersion(), body, accept, context)); + } + + /** + * Exchange an AAD access token of a Teams user for a new Communication Identity access token with a matching + * expiration time. + * + * @param body AAD access token of a Teams user. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an access token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> exchangeTeamsUserAccessTokenWithResponseAsync( + TeamsUserAccessTokenRequest body, Context context) { + final String accept = "application/json"; + return service.exchangeTeamsUserAccessToken( + this.client.getEndpoint(), this.client.getApiVersion(), body, accept, context); + } + + /** + * Exchange an AAD access token of a Teams user for a new Communication Identity access token with a matching + * expiration time. + * + * @param body AAD access token of a Teams user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an access token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono exchangeTeamsUserAccessTokenAsync(TeamsUserAccessTokenRequest body) { + return exchangeTeamsUserAccessTokenWithResponseAsync(body) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Exchange an AAD access token of a Teams user for a new Communication Identity access token with a matching + * expiration time. + * + * @param body AAD access token of a Teams user. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an access token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono exchangeTeamsUserAccessTokenAsync( + TeamsUserAccessTokenRequest body, Context context) { + return exchangeTeamsUserAccessTokenWithResponseAsync(body, context) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Exchange an AAD access token of a Teams user for a new Communication Identity access token with a matching + * expiration time. + * + * @param body AAD access token of a Teams user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an access token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CommunicationIdentityAccessToken exchangeTeamsUserAccessToken(TeamsUserAccessTokenRequest body) { + return exchangeTeamsUserAccessTokenAsync(body).block(); + } + + /** + * Exchange an AAD access token of a Teams user for a new Communication Identity access token with a matching + * expiration time. + * + * @param body AAD access token of a Teams user. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws CommunicationErrorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an access token. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void revokeAccessTokens(String id, Context context) { - revokeAccessTokensAsync(id, context).block(); + public Response exchangeTeamsUserAccessTokenWithResponse( + TeamsUserAccessTokenRequest body, Context context) { + return exchangeTeamsUserAccessTokenWithResponseAsync(body, context).block(); } /** * Issue a new token for an identity. * * @param id Identifier of the identity to issue token for. - * @param body Requesting scopes for the new token. + * @param body Requested scopes for the new token. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -384,17 +537,18 @@ public void revokeAccessTokens(String id, Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Mono> issueAccessTokenWithResponseAsync( String id, CommunicationIdentityAccessTokenRequest body) { + final String accept = "application/json"; return FluxUtil.withContext( context -> service.issueAccessToken( - this.client.getEndpoint(), id, this.client.getApiVersion(), body, context)); + this.client.getEndpoint(), id, this.client.getApiVersion(), body, accept, context)); } /** * Issue a new token for an identity. * * @param id Identifier of the identity to issue token for. - * @param body Requesting scopes for the new token. + * @param body Requested scopes for the new token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. @@ -404,14 +558,16 @@ public Mono> issueAccessTokenWithResp @ServiceMethod(returns = ReturnType.SINGLE) public Mono> issueAccessTokenWithResponseAsync( String id, CommunicationIdentityAccessTokenRequest body, Context context) { - return service.issueAccessToken(this.client.getEndpoint(), id, this.client.getApiVersion(), body, context); + final String accept = "application/json"; + return service.issueAccessToken( + this.client.getEndpoint(), id, this.client.getApiVersion(), body, accept, context); } /** * Issue a new token for an identity. * * @param id Identifier of the identity to issue token for. - * @param body Requesting scopes for the new token. + * @param body Requested scopes for the new token. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -435,7 +591,7 @@ public Mono issueAccessTokenAsync( * Issue a new token for an identity. * * @param id Identifier of the identity to issue token for. - * @param body Requesting scopes for the new token. + * @param body Requested scopes for the new token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. @@ -460,7 +616,7 @@ public Mono issueAccessTokenAsync( * Issue a new token for an identity. * * @param id Identifier of the identity to issue token for. - * @param body Requesting scopes for the new token. + * @param body Requested scopes for the new token. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -475,7 +631,7 @@ public CommunicationIdentityAccessToken issueAccessToken(String id, Communicatio * Issue a new token for an identity. * * @param id Identifier of the identity to issue token for. - * @param body Requesting scopes for the new token. + * @param body Requested scopes for the new token. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CommunicationErrorResponseException thrown if the request is rejected by server. @@ -483,8 +639,8 @@ public CommunicationIdentityAccessToken issueAccessToken(String id, Communicatio * @return an access token. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CommunicationIdentityAccessToken issueAccessToken( + public Response issueAccessTokenWithResponse( String id, CommunicationIdentityAccessTokenRequest body, Context context) { - return issueAccessTokenAsync(id, body, context).block(); + return issueAccessTokenWithResponseAsync(id, body, context).block(); } } diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentityClientImpl.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentityClientImpl.java index 2009d7a6a576b..febbc88bd3a42 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentityClientImpl.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentityClientImpl.java @@ -9,6 +9,8 @@ import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; /** Initializes a new instance of the CommunicationIdentityClient type. */ public final class CommunicationIdentityClientImpl { @@ -48,36 +50,71 @@ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The CommunicationIdentityImpl object to access its operations. */ - private final CommunicationIdentityImpl communicationIdentity; + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; /** - * Gets the CommunicationIdentityImpl object to access its operations. + * Gets The serializer to serialize an object into a string. * - * @return the CommunicationIdentityImpl object. + * @return the serializerAdapter value. */ - public CommunicationIdentityImpl getCommunicationIdentity() { - return this.communicationIdentity; + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; } - /** Initializes an instance of CommunicationIdentityClient client. */ - CommunicationIdentityClientImpl(String endpoint) { + /** The CommunicationIdentitiesImpl object to access its operations. */ + private final CommunicationIdentitiesImpl communicationIdentities; + + /** + * Gets the CommunicationIdentitiesImpl object to access its operations. + * + * @return the CommunicationIdentitiesImpl object. + */ + public CommunicationIdentitiesImpl getCommunicationIdentities() { + return this.communicationIdentities; + } + + /** + * Initializes an instance of CommunicationIdentityClient client. + * + * @param endpoint The communication resource, for example https://my-resource.communication.azure.com. + * @param apiVersion Api Version. + */ + CommunicationIdentityClientImpl(String endpoint, String apiVersion) { this( new HttpPipelineBuilder() .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) .build(), - endpoint); + JacksonAdapter.createDefaultSerializerAdapter(), + endpoint, + apiVersion); + } + + /** + * Initializes an instance of CommunicationIdentityClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint The communication resource, for example https://my-resource.communication.azure.com. + * @param apiVersion Api Version. + */ + CommunicationIdentityClientImpl(HttpPipeline httpPipeline, String endpoint, String apiVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, apiVersion); } /** * Initializes an instance of CommunicationIdentityClient client. * * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint The communication resource, for example https://my-resource.communication.azure.com. + * @param apiVersion Api Version. */ - CommunicationIdentityClientImpl(HttpPipeline httpPipeline, String endpoint) { + CommunicationIdentityClientImpl( + HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, String apiVersion) { this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; - this.apiVersion = "2021-03-07"; - this.communicationIdentity = new CommunicationIdentityImpl(this); + this.apiVersion = apiVersion; + this.communicationIdentities = new CommunicationIdentitiesImpl(this); } } diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentityClientImplBuilder.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentityClientImplBuilder.java index 730c755f075b8..be914661e5052 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentityClientImplBuilder.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/CommunicationIdentityClientImplBuilder.java @@ -5,15 +5,38 @@ package com.azure.communication.identity.implementation; import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.Configuration; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** A builder for creating a new instance of the CommunicationIdentityClient type. */ @ServiceClientBuilder(serviceClients = {CommunicationIdentityClientImpl.class}) public final class CommunicationIdentityClientImplBuilder { + private static final String SDK_NAME = "name"; + + private static final String SDK_VERSION = "version"; + + private final Map properties = new HashMap<>(); + + /** Create an instance of the CommunicationIdentityClientImplBuilder. */ + public CommunicationIdentityClientImplBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + /* * The communication resource, for example * https://my-resource.communication.azure.com @@ -31,6 +54,22 @@ public CommunicationIdentityClientImplBuilder endpoint(String endpoint) { return this; } + /* + * Api Version + */ + private String apiVersion; + + /** + * Sets Api Version. + * + * @param apiVersion the apiVersion value. + * @return the CommunicationIdentityClientImplBuilder. + */ + public CommunicationIdentityClientImplBuilder apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + /* * The HTTP pipeline to send requests through */ @@ -47,19 +86,146 @@ public CommunicationIdentityClientImplBuilder pipeline(HttpPipeline pipeline) { return this; } + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the CommunicationIdentityClientImplBuilder. + */ + public CommunicationIdentityClientImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The HTTP client used to send the request. + */ + private HttpClient httpClient; + + /** + * Sets The HTTP client used to send the request. + * + * @param httpClient the httpClient value. + * @return the CommunicationIdentityClientImplBuilder. + */ + public CommunicationIdentityClientImplBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The configuration store that is used during construction of the service + * client. + */ + private Configuration configuration; + + /** + * Sets The configuration store that is used during construction of the service client. + * + * @param configuration the configuration value. + * @return the CommunicationIdentityClientImplBuilder. + */ + public CommunicationIdentityClientImplBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + private HttpLogOptions httpLogOptions; + + /** + * Sets The logging configuration for HTTP requests and responses. + * + * @param httpLogOptions the httpLogOptions value. + * @return the CommunicationIdentityClientImplBuilder. + */ + public CommunicationIdentityClientImplBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if + * applicable. + */ + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the CommunicationIdentityClientImplBuilder. + */ + public CommunicationIdentityClientImplBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /* + * The list of Http pipeline policies to add. + */ + private final List pipelinePolicies; + + /** + * Adds a custom Http pipeline policy. + * + * @param customPolicy The custom Http pipeline policy to add. + * @return the CommunicationIdentityClientImplBuilder. + */ + public CommunicationIdentityClientImplBuilder addPolicy(HttpPipelinePolicy customPolicy) { + pipelinePolicies.add(customPolicy); + return this; + } + /** * Builds an instance of CommunicationIdentityClientImpl with the provided parameters. * * @return an instance of CommunicationIdentityClientImpl. */ public CommunicationIdentityClientImpl buildClient() { + if (apiVersion == null) { + this.apiVersion = "2021-10-31-preview"; + } if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); + this.pipeline = createHttpPipeline(); + } + if (serializerAdapter == null) { + this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter(); } - CommunicationIdentityClientImpl client = new CommunicationIdentityClientImpl(pipeline, endpoint); + CommunicationIdentityClientImpl client = + new CommunicationIdentityClientImpl(pipeline, serializerAdapter, endpoint, apiVersion); return client; } + + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration = + (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + if (httpLogOptions == null) { + httpLogOptions = new HttpLogOptions(); + } + List policies = new ArrayList<>(); + String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); + policies.add( + new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, buildConfiguration)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy); + policies.add(new CookiePolicy()); + policies.addAll(this.pipelinePolicies); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = + new HttpPipelineBuilder() + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .build(); + return httpPipeline; + } } diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationError.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationError.java index 7f002f7ad620e..c92ed7dbfed7a 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationError.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationError.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The CommunicationError model. */ +/** The Communication Services error. */ @Fluent public final class CommunicationError { /* @@ -36,9 +36,9 @@ public final class CommunicationError { private List details; /* - * The Communication Services error. + * The inner error if any. */ - @JsonProperty(value = "innerError") + @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) private CommunicationError innerError; /** @@ -100,22 +100,11 @@ public List getDetails() { } /** - * Get the innerError property: The Communication Services error. + * Get the innerError property: The inner error if any. * * @return the innerError value. */ public CommunicationError getInnerError() { return this.innerError; } - - /** - * Set the innerError property: The Communication Services error. - * - * @param innerError the innerError value to set. - * @return the CommunicationError object itself. - */ - public CommunicationError setInnerError(CommunicationError innerError) { - this.innerError = innerError; - return this; - } } diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationErrorResponse.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationErrorResponse.java index cfde9c4d19f02..117cffc03b39c 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationErrorResponse.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationErrorResponse.java @@ -7,7 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The CommunicationErrorResponse model. */ +/** The Communication Services error. */ @Fluent public final class CommunicationErrorResponse { /* diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationIdentity.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationIdentity.java index 193ca74809fe6..0846c2e6cf95c 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationIdentity.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationIdentity.java @@ -7,7 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The CommunicationIdentity model. */ +/** A communication identity. */ @Fluent public final class CommunicationIdentity { /* diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationIdentityAccessToken.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationIdentityAccessToken.java index dc106e285c8f9..fe2c90f07bd9f 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationIdentityAccessToken.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationIdentityAccessToken.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** The CommunicationIdentityAccessToken model. */ +/** An access token. */ @Fluent public final class CommunicationIdentityAccessToken { /* diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationIdentityAccessTokenResult.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationIdentityAccessTokenResult.java index 67169dd47f8b2..47a8448fca7b2 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationIdentityAccessTokenResult.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/CommunicationIdentityAccessTokenResult.java @@ -7,7 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The CommunicationIdentityAccessTokenResult model. */ +/** A communication identity with access token. */ @Fluent public final class CommunicationIdentityAccessTokenResult { /* diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/TeamsUserAccessTokenRequest.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/TeamsUserAccessTokenRequest.java new file mode 100644 index 0000000000000..054a58c82d57b --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/models/TeamsUserAccessTokenRequest.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.identity.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TeamsUserAccessTokenRequest model. */ +@Fluent +public final class TeamsUserAccessTokenRequest { + /* + * AAD access token of a Teams User to acquire a new Communication Identity + * access token. + */ + @JsonProperty(value = "token", required = true) + private String token; + + /** + * Get the token property: AAD access token of a Teams User to acquire a new Communication Identity access token. + * + * @return the token value. + */ + public String getToken() { + return this.token; + } + + /** + * Set the token property: AAD access token of a Teams User to acquire a new Communication Identity access token. + * + * @param token the token value to set. + * @return the TeamsUserAccessTokenRequest object itself. + */ + public TeamsUserAccessTokenRequest setToken(String token) { + this.token = token; + return this; + } +} diff --git a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/package-info.java b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/package-info.java index 1ea141047ac51..fbd3ee4680935 100644 --- a/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/package-info.java +++ b/sdk/communication/azure-communication-identity/src/main/java/com/azure/communication/identity/implementation/package-info.java @@ -2,8 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** - * Package containing the implementations and inner classes for CommunicationIdentityClient. Azure Communication - * Identity Service. - */ +/** Package containing the implementations for CommunicationIdentityClient. Azure Communication Identity Service. */ package com.azure.communication.identity.implementation; diff --git a/sdk/communication/azure-communication-identity/src/samples/java/com/azure/communication/identity/ReadmeSamples.java b/sdk/communication/azure-communication-identity/src/samples/java/com/azure/communication/identity/ReadmeSamples.java index 88822561421f9..93342e7ecc15c 100644 --- a/sdk/communication/azure-communication-identity/src/samples/java/com/azure/communication/identity/ReadmeSamples.java +++ b/sdk/communication/azure-communication-identity/src/samples/java/com/azure/communication/identity/ReadmeSamples.java @@ -2,14 +2,23 @@ // Licensed under the MIT License. package com.azure.communication.identity; +import java.net.MalformedURLException; import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Set; +import java.util.concurrent.ExecutionException; + import com.azure.communication.common.CommunicationUserIdentifier; import com.azure.communication.identity.models.CommunicationTokenScope; import com.azure.communication.identity.models.CommunicationUserIdentifierAndToken; import com.azure.core.credential.AccessToken; import com.azure.core.credential.AzureKeyCredential; import com.azure.identity.DefaultAzureCredentialBuilder; +import com.microsoft.aad.msal4j.IAuthenticationResult; +import com.microsoft.aad.msal4j.IPublicClientApplication; +import com.microsoft.aad.msal4j.PublicClientApplication; +import com.microsoft.aad.msal4j.UserNamePasswordParameters; public class ReadmeSamples { /** @@ -131,6 +140,44 @@ public void deleteUser() { communicationIdentityClient.deleteUser(user); } + /** + * Sample code for exchanging an AAD access token of a Teams User for a new Communication Identity access token. + */ + public void exchangeTeamsToken() { + CommunicationIdentityClient communicationIdentityClient = createCommunicationIdentityClient(); + try { + String accessTokenAAD = generateTeamsToken(); + AccessToken accessToken = communicationIdentityClient.exchangeTeamsToken(accessTokenAAD); + System.out.println("User token value: " + accessToken.getToken()); + System.out.println("Expires at: " + accessToken.getExpiresAt()); + } catch (Exception ex) { + System.out.println(ex.getMessage()); + } + } + + /** + * Sample code for generating an AAD access token of a Teams User + */ + private static String generateTeamsToken() throws MalformedURLException, ExecutionException, InterruptedException { + String token = ""; + try { + IPublicClientApplication publicClientApplication = PublicClientApplication.builder("") + .authority("" + "/" + "") + .build(); + //M365 scopes + Set scopes = Collections.singleton("https://auth.msft.communication.azure.com/VoIP"); + char[] password = "".toCharArray(); + UserNamePasswordParameters userNamePasswordParameters = UserNamePasswordParameters.builder(scopes, "", password) + .build(); + Arrays.fill(password, '0'); + IAuthenticationResult result = publicClientApplication.acquireToken(userNamePasswordParameters).get(); + token = result.accessToken(); + } catch (Exception e) { + throw e; + } + return token; + } + /** * Sample code for troubleshooting */ diff --git a/sdk/communication/azure-communication-identity/src/test/java/com/azure/communication/identity/CommunicationIdentityAsyncTests.java b/sdk/communication/azure-communication-identity/src/test/java/com/azure/communication/identity/CommunicationIdentityAsyncTests.java index f97a0cd92d7e4..68192462aae1c 100644 --- a/sdk/communication/azure-communication-identity/src/test/java/com/azure/communication/identity/CommunicationIdentityAsyncTests.java +++ b/sdk/communication/azure-communication-identity/src/test/java/com/azure/communication/identity/CommunicationIdentityAsyncTests.java @@ -2,10 +2,6 @@ // Licensed under the MIT License. package com.azure.communication.identity; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; - import java.util.Arrays; import java.util.List; @@ -22,6 +18,8 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; +import static org.junit.jupiter.api.Assertions.*; + public class CommunicationIdentityAsyncTests extends CommunicationIdentityClientTestBase { private CommunicationIdentityAsyncClient asyncClient; @@ -304,12 +302,7 @@ public void getToken(HttpClient httpClient) { List scopes = Arrays.asList(CommunicationTokenScope.CHAT); return asyncClient.getToken(communicationUser, scopes); })) - .assertNext(issuedToken -> { - assertNotNull(issuedToken.getToken()); - assertFalse(issuedToken.getToken().isEmpty()); - assertNotNull(issuedToken.getExpiresAt()); - assertFalse(issuedToken.getExpiresAt().toString().isEmpty()); - }) + .assertNext(issuedToken -> verifyTokenNotEmpty(issuedToken)) .verifyComplete(); } @@ -328,10 +321,7 @@ public void getTokenWithResponse(HttpClient httpClient) { return asyncClient.getTokenWithResponse(communicationUser, scopes); })) .assertNext(issuedToken -> { - assertNotNull(issuedToken.getValue().getToken()); - assertFalse(issuedToken.getValue().getToken().isEmpty()); - assertNotNull(issuedToken.getValue().getExpiresAt()); - assertFalse(issuedToken.getValue().getExpiresAt().toString().isEmpty()); + verifyTokenNotEmpty(issuedToken.getValue()); assertEquals(issuedToken.getStatusCode(), 200); }) .verifyComplete(); @@ -377,6 +367,90 @@ public void getTokenWithResponseWithNullUser(HttpClient httpClient) { .verifyError(NullPointerException.class); } + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsToken(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilder(httpClient); + asyncClient = setupAsyncClient(builder, "exchangeTeamsToken"); + try { + String accessTokenAAD = generateTeamsToken(); + // Action & Assert + Mono response = asyncClient.exchangeTeamsToken(accessTokenAAD); + StepVerifier.create(response) + .assertNext(issuedToken -> verifyTokenNotEmpty(issuedToken)) + .verifyComplete(); + } catch (Exception exception) { + fail("Could not generate teams token"); + } + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenWithEmptyToken(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilder(httpClient); + asyncClient = setupAsyncClient(builder, "exchangeTeamsTokenWithEmptyToken"); + // Action & Assert + Mono response = asyncClient.exchangeTeamsToken(""); + StepVerifier.create(response) + .verifyErrorSatisfies(throwable -> { + assertNotNull(throwable.getMessage()); + assertTrue(throwable.getMessage().contains("401")); + }); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenWithNull(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilder(httpClient); + asyncClient = setupAsyncClient(builder, "exchangeTeamsTokenWithNull"); + // Action & Assert + Mono response = asyncClient.exchangeTeamsToken(null); + StepVerifier.create(response) + .verifyErrorSatisfies(throwable -> { + assertNotNull(throwable.getMessage()); + assertTrue(throwable.getMessage().contains("token")); + }); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenWithInvalidToken(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilder(httpClient); + asyncClient = setupAsyncClient(builder, "exchangeTeamsTokenWithInvalidToken"); + // Action & Assert + Mono response = asyncClient.exchangeTeamsToken("invalid"); + StepVerifier.create(response) + .verifyErrorSatisfies(throwable -> { + assertNotNull(throwable.getMessage()); + assertTrue(throwable.getMessage().contains("401")); + }); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenWithResponse(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilder(httpClient); + asyncClient = setupAsyncClient(builder, "exchangeTeamsTokenWithResponse"); + try { + String accessTokenAAD = generateTeamsToken(); + // Action & Assert + Mono> response = asyncClient.exchangeTeamsTokenWithResponse(accessTokenAAD); + StepVerifier.create(response) + .assertNext(issuedTokenResponse -> { + verifyTokenNotEmpty(issuedTokenResponse.getValue()); + assertEquals(200, issuedTokenResponse.getStatusCode(), "Expect status code to be 201"); + }) + .verifyComplete(); + } catch (Exception exception) { + fail("Could not generate teams token"); + } + } + @ParameterizedTest @MethodSource("com.azure.core.test.TestBase#getHttpClients") public void createUserWithResponseUsingManagedIdentity(HttpClient httpClient) { @@ -504,12 +578,7 @@ public void getTokenUsingManagedIdentity(HttpClient httpClient) { List scopes = Arrays.asList(CommunicationTokenScope.CHAT); return asyncClient.getToken(communicationUser, scopes); })) - .assertNext(issuedToken -> { - assertNotNull(issuedToken.getToken()); - assertFalse(issuedToken.getToken().isEmpty()); - assertNotNull(issuedToken.getExpiresAt()); - assertFalse(issuedToken.getExpiresAt().toString().isEmpty()); - }) + .assertNext(issuedToken -> verifyTokenNotEmpty(issuedToken)) .verifyComplete(); } @@ -527,15 +596,49 @@ public void getTokenWithResponseUsingManagedIdentity(HttpClient httpClient) { List scopes = Arrays.asList(CommunicationTokenScope.CHAT); return asyncClient.getTokenWithResponse(communicationUser, scopes); })) - .assertNext(issuedToken -> { - assertNotNull(issuedToken.getValue().getToken()); - assertFalse(issuedToken.getValue().getToken().isEmpty()); - assertNotNull(issuedToken.getValue().getExpiresAt()); - assertFalse(issuedToken.getValue().getExpiresAt().toString().isEmpty()); - }) + .assertNext(issuedToken -> verifyTokenNotEmpty(issuedToken.getValue())) .verifyComplete(); } + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenUsingManagedIdentity(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilderUsingManagedIdentity(httpClient); + asyncClient = setupAsyncClient(builder, "exchangeTeamsTokenUsingManagedIdentity"); + try { + String accessTokenAAD = generateTeamsToken(); + // Action & Assert + Mono response = asyncClient.exchangeTeamsToken(accessTokenAAD); + StepVerifier.create(response) + .assertNext(issuedToken -> verifyTokenNotEmpty(issuedToken)) + .verifyComplete(); + } catch (Exception exception) { + fail("Could not generate teams token"); + } + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenWithResponseUsingManagedIdentity(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilderUsingManagedIdentity(httpClient); + asyncClient = setupAsyncClient(builder, "exchangeTeamsTokenWithResponseUsingManagedIdentity"); + try { + String accessTokenAAD = generateTeamsToken(); + // Action & Assert + Mono> response = asyncClient.exchangeTeamsTokenWithResponse(accessTokenAAD); + StepVerifier.create(response) + .assertNext(issuedTokenResponse -> { + verifyTokenNotEmpty(issuedTokenResponse.getValue()); + assertEquals(200, issuedTokenResponse.getStatusCode(), "Expect status code to be 201"); + }) + .verifyComplete(); + } catch (Exception exception) { + fail("Could not generate teams token"); + } + } + private CommunicationIdentityAsyncClient setupAsyncClient(CommunicationIdentityClientBuilder builder, String testName) { return addLoggingPolicy(builder, testName).buildAsyncClient(); } diff --git a/sdk/communication/azure-communication-identity/src/test/java/com/azure/communication/identity/CommunicationIdentityClientTestBase.java b/sdk/communication/azure-communication-identity/src/test/java/com/azure/communication/identity/CommunicationIdentityClientTestBase.java index 30a12efc9a6d9..0ea05eac710a0 100644 --- a/sdk/communication/azure-communication-identity/src/test/java/com/azure/communication/identity/CommunicationIdentityClientTestBase.java +++ b/sdk/communication/azure-communication-identity/src/test/java/com/azure/communication/identity/CommunicationIdentityClientTestBase.java @@ -17,23 +17,53 @@ import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; import com.azure.identity.DefaultAzureCredentialBuilder; +import com.microsoft.aad.msal4j.IAuthenticationResult; +import com.microsoft.aad.msal4j.IPublicClientApplication; +import com.microsoft.aad.msal4j.PublicClientApplication; +import com.microsoft.aad.msal4j.UserNamePasswordParameters; import reactor.core.publisher.Mono; +import java.net.MalformedURLException; import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import java.util.StringJoiner; +import java.util.*; +import java.util.concurrent.ExecutionException; import java.util.function.Function; import java.util.regex.Matcher; import java.util.regex.Pattern; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; + public class CommunicationIdentityClientTestBase extends TestBase { protected static final TestMode TEST_MODE = initializeTestMode(); protected static final String CONNECTION_STRING = Configuration.getGlobalConfiguration() .get("COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING", "endpoint=https://REDACTED.communication.azure.com/;accesskey=QWNjZXNzS2V5"); + private static final String COMMUNICATION_M365_APP_ID = Configuration.getGlobalConfiguration() + .get("COMMUNICATION_M365_APP_ID", "Sanitized"); + + private static final String COMMUNICATION_M365_AAD_AUTHORITY = Configuration.getGlobalConfiguration() + .get("COMMUNICATION_M365_AAD_AUTHORITY", "Sanitized"); + + private static final String COMMUNICATION_M365_AAD_TENANT = Configuration.getGlobalConfiguration() + .get("COMMUNICATION_M365_AAD_TENANT", "Sanitized"); + + private static final String COMMUNICATION_M365_REDIRECT_URI = Configuration.getGlobalConfiguration() + .get("COMMUNICATION_M365_REDIRECT_URI", "Sanitized"); + + private static final String COMMUNICATION_M365_SCOPE = Configuration.getGlobalConfiguration() + .get("COMMUNICATION_M365_SCOPE", "Sanitized"); + + protected static final String COMMUNICATION_EXPIRED_TEAMS_TOKEN = Configuration.getGlobalConfiguration() + .get("COMMUNICATION_EXPIRED_TEAMS_TOKEN", "Sanitized"); + + private static final String COMMUNICATION_MSAL_USERNAME = Configuration.getGlobalConfiguration() + .get("COMMUNICATION_MSAL_USERNAME", "Sanitized"); + + private static final String COMMUNICATION_MSAL_PASSWORD = Configuration.getGlobalConfiguration() + .get("COMMUNICATION_MSAL_PASSWORD", "Sanitized"); + private static final StringJoiner JSON_PROPERTIES_TO_REDACT = new StringJoiner("\":\"|\"", "\"", "\":\"") .add("token"); @@ -152,4 +182,33 @@ private String redact(String content, Matcher matcher, String replacement) { return content; } + + protected static String generateTeamsToken() throws MalformedURLException, ExecutionException, InterruptedException { + String token = "Sanitized"; + if (TEST_MODE != TestMode.PLAYBACK) { + try { + IPublicClientApplication publicClientApplication = PublicClientApplication.builder(COMMUNICATION_M365_APP_ID) + .authority(COMMUNICATION_M365_AAD_AUTHORITY + "/" + COMMUNICATION_M365_AAD_TENANT) + .build(); + Set scopes = Collections.singleton(COMMUNICATION_M365_SCOPE); + char[] password = COMMUNICATION_MSAL_PASSWORD.toCharArray(); + UserNamePasswordParameters userNamePasswordParameters = UserNamePasswordParameters.builder(scopes, COMMUNICATION_MSAL_USERNAME, password) + .build(); + Arrays.fill(password, '0'); + IAuthenticationResult result = publicClientApplication.acquireToken(userNamePasswordParameters).get(); + token = result.accessToken(); + } catch (Exception e) { + throw e; + } + } + return token; + } + + protected void verifyTokenNotEmpty(AccessToken issuedToken) { + assertNotNull(issuedToken.getToken()); + assertFalse(issuedToken.getToken().isEmpty()); + assertNotNull(issuedToken.getExpiresAt()); + assertFalse(issuedToken.getExpiresAt().toString().isEmpty()); + } + } diff --git a/sdk/communication/azure-communication-identity/src/test/java/com/azure/communication/identity/CommunicationIdentityTests.java b/sdk/communication/azure-communication-identity/src/test/java/com/azure/communication/identity/CommunicationIdentityTests.java index b0ac974b2ba85..e734d6c522ccc 100644 --- a/sdk/communication/azure-communication-identity/src/test/java/com/azure/communication/identity/CommunicationIdentityTests.java +++ b/sdk/communication/azure-communication-identity/src/test/java/com/azure/communication/identity/CommunicationIdentityTests.java @@ -2,13 +2,6 @@ // Licensed under the MIT License. package com.azure.communication.identity; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -import java.util.Arrays; -import java.util.List; - import com.azure.communication.common.CommunicationUserIdentifier; import com.azure.communication.identity.models.CommunicationTokenScope; import com.azure.communication.identity.models.CommunicationUserIdentifierAndToken; @@ -16,10 +9,14 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; - import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; +import java.util.Arrays; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; + public class CommunicationIdentityTests extends CommunicationIdentityClientTestBase { private CommunicationIdentityClient client; @@ -223,10 +220,7 @@ public void getToken(HttpClient httpClient) { // Action & Assert AccessToken issuedToken = client.getToken(communicationUser, scopes); - assertNotNull(issuedToken.getToken()); - assertFalse(issuedToken.getToken().isEmpty()); - assertNotNull(issuedToken.getExpiresAt()); - assertFalse(issuedToken.getExpiresAt().toString().isEmpty()); + verifyTokenNotEmpty(issuedToken); } @ParameterizedTest @@ -240,12 +234,8 @@ public void getTokenWithResponse(HttpClient httpClient) { // Action & Assert Response issuedTokenResponse = client.getTokenWithResponse(communicationUser, scopes, Context.NONE); - AccessToken issuedToken = issuedTokenResponse.getValue(); - assertEquals(200, issuedTokenResponse.getStatusCode(), "Expect status code to be 200"); - assertNotNull(issuedToken.getToken()); - assertFalse(issuedToken.getToken().isEmpty()); - assertNotNull(issuedToken.getExpiresAt()); - assertFalse(issuedToken.getExpiresAt().toString().isEmpty()); + assertEquals(200, issuedTokenResponse.getStatusCode(), "Expect status code to be 200"); + verifyTokenNotEmpty(issuedTokenResponse.getValue()); } @ParameterizedTest @@ -259,12 +249,8 @@ public void getTokenWithResponseNullContext(HttpClient httpClient) { // Action & Assert Response issuedTokenResponse = client.getTokenWithResponse(communicationUser, scopes, null); - AccessToken issuedToken = issuedTokenResponse.getValue(); - assertEquals(200, issuedTokenResponse.getStatusCode(), "Expect status code to be 200"); - assertNotNull(issuedToken.getToken()); - assertFalse(issuedToken.getToken().isEmpty()); - assertNotNull(issuedToken.getExpiresAt()); - assertFalse(issuedToken.getExpiresAt().toString().isEmpty()); + assertEquals(200, issuedTokenResponse.getStatusCode(), "Expect status code to be 200"); + verifyTokenNotEmpty(issuedTokenResponse.getValue()); } @ParameterizedTest @@ -348,10 +334,7 @@ public void getTokenUsingManagedIdentity(HttpClient httpClient) { // Action & Assert AccessToken issuedToken = client.getToken(communicationUser, scopes); - assertNotNull(issuedToken.getToken()); - assertFalse(issuedToken.getToken().isEmpty()); - assertNotNull(issuedToken.getExpiresAt()); - assertFalse(issuedToken.getExpiresAt().toString().isEmpty()); + verifyTokenNotEmpty(issuedToken); } @ParameterizedTest @@ -365,15 +348,147 @@ public void getTokenWithResponseUsingManagedIdentity(HttpClient httpClient) { // Action & Assert Response response = client.getTokenWithResponse(communicationUser, scopes, Context.NONE); - AccessToken issuedToken = response.getValue(); - assertEquals(200, response.getStatusCode(), "Expect status code to be 200"); - assertNotNull(issuedToken.getToken()); - assertFalse(issuedToken.getToken().isEmpty()); - assertNotNull(issuedToken.getExpiresAt()); - assertFalse(issuedToken.getExpiresAt().toString().isEmpty()); + assertEquals(200, response.getStatusCode(), "Expect status code to be 200"); + verifyTokenNotEmpty(response.getValue()); } private CommunicationIdentityClient setupClient(CommunicationIdentityClientBuilder builder, String testName) { return addLoggingPolicy(builder, testName).buildClient(); } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenWithEmptyToken(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilder(httpClient); + client = setupClient(builder, "exchangeTeamsTokenWithEmptyTokenSync"); + // Action & Assert + try { + AccessToken issuedToken = client.exchangeTeamsToken(""); + } catch (Exception exception) { + assertNotNull(exception.getMessage()); + assertTrue(exception.getMessage().contains("401")); + return; + } + fail("An exception should have been thrown."); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenWithNull(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilder(httpClient); + client = setupClient(builder, "exchangeTeamsTokenWithNullSync"); + // Action & Assert + try { + AccessToken issuedToken = client.exchangeTeamsToken(null); + } catch (Exception exception) { + assertNotNull(exception.getMessage()); + assertTrue(exception.getMessage().contains("token")); + return; + } + fail("An exception should have been thrown."); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenWithInvalidToken(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilder(httpClient); + client = setupClient(builder, "exchangeTeamsTokenWithInvalidTokenSync"); + // Action & Assert + try { + AccessToken issuedToken = client.exchangeTeamsToken("invalid"); + } catch (Exception exception) { + assertNotNull(exception.getMessage()); + assertTrue(exception.getMessage().contains("401")); + return; + } + fail("An exception should have been thrown."); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenWithExpiredToken(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilder(httpClient); + client = setupClient(builder, "exchangeTeamsTokenWithExpiredTokenSync"); + // Action & Assert + try { + AccessToken issuedToken = client.exchangeTeamsToken(COMMUNICATION_EXPIRED_TEAMS_TOKEN); + } catch (Exception exception) { + assertNotNull(exception.getMessage()); + assertTrue(exception.getMessage().contains("401")); + return; + } + fail("An exception should have been thrown."); + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenWithValidToken(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilder(httpClient); + client = setupClient(builder, "exchangeTeamsTokenWithValidTokenSync"); + // Action & Assert + try { + String accessTokenAAD = generateTeamsToken(); + AccessToken issuedToken = client.exchangeTeamsToken(accessTokenAAD); + verifyTokenNotEmpty(issuedToken); + } catch (Exception exception) { + fail("Could not generate teams token"); + } + + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenWithValidTokenWithResponse(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilder(httpClient); + client = setupClient(builder, "exchangeTeamsTokenWithValidTokenWithResponseSync"); + // Action & Assert + try { + String accessTokenAAD = generateTeamsToken(); + Response response = client.exchangeTeamsTokenWithResponse(accessTokenAAD, Context.NONE); + assertEquals(200, response.getStatusCode(), "Expect status code to be 200"); + verifyTokenNotEmpty(response.getValue()); + } catch (Exception exception) { + fail("Could not generate teams token"); + } + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenUsingManagedIdentity(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilderUsingManagedIdentity(httpClient); + client = setupClient(builder, "exchangeTeamsTokenUsingManagedIdentitySync"); + // Action & Assert + try { + String accessTokenAAD = generateTeamsToken(); + AccessToken issuedToken = client.exchangeTeamsToken(accessTokenAAD); + verifyTokenNotEmpty(issuedToken); + } catch (Exception e) { + fail("Could not generate teams token"); + } + } + + @ParameterizedTest + @MethodSource("com.azure.core.test.TestBase#getHttpClients") + public void exchangeTeamsTokenWithResponseUsingManagedIdentity(HttpClient httpClient) { + // Arrange + CommunicationIdentityClientBuilder builder = createClientBuilderUsingManagedIdentity(httpClient); + client = setupClient(builder, "exchangeTeamsTokenWithResponseUsingManagedIdentitySync"); + // Action & Assert + try { + String accessTokenAAD = generateTeamsToken(); + Response response = client.exchangeTeamsTokenWithResponse(accessTokenAAD, Context.NONE); + assertEquals(200, response.getStatusCode(), "Expect status code to be 200"); + verifyTokenNotEmpty(response.getValue()); + } catch (Exception e) { + fail("Could not generate teams token"); + } + } + } diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createAsyncIdentityClientUsingConnectionString[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createAsyncIdentityClientUsingConnectionString[1].json index 45fa8d4210073..c8a46015b0723 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createAsyncIdentityClientUsingConnectionString[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createAsyncIdentityClientUsingConnectionString[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "79659a6b-9a5b-4df9-8cb5-d93ccf922d2f", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "6572a162-fd7f-4ad5-9028-284cfe6e195d", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:20 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:42 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "24ms", - "MS-CV" : "PaAvzl9h/ECGEvRz9p+5QA.0", - "X-Azure-Ref" : "0yb3DYAAAAACPrTLq1NWkQYrh+DuGGu6/WVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-febe-02c3-593a0d009c56\"}}", - "x-ms-client-request-id" : "79659a6b-9a5b-4df9-8cb5-d93ccf922d2f", + "X-Processing-Time" : "91ms", + "MS-CV" : "TLiWl+d0QkSoN9iTlqjchw.0", + "X-Azure-Ref" : "0+sJlYQAAAAAHmCFToPpnQ5qzHQkLZjiBUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-489f-e1fe-08482200b5fe\"}}", + "x-ms-client-request-id" : "6572a162-fd7f-4ad5-9028-284cfe6e195d", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createAsyncIdentityClientUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createAsyncIdentityClientUsingManagedIdentity[1].json index f84ceada9efd6..b987bac6f6507 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createAsyncIdentityClientUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createAsyncIdentityClientUsingManagedIdentity[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "dc78bae8-142c-4653-899d-6f73def6d4a9", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "bcfffabd-e631-46e9-81f0-9cc4ac87db45", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:19 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:40 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "80ms", - "MS-CV" : "Gc3JI5lzlEuWRSwkPrre1Q.0", - "X-Azure-Ref" : "0x73DYAAAAAAFwFhWdIpbR7rC2IwGQM99WVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-f836-290c-113a0d008365\"}}", - "x-ms-client-request-id" : "dc78bae8-142c-4653-899d-6f73def6d4a9", + "X-Processing-Time" : "92ms", + "MS-CV" : "NJDH/UUB7U6XNZJD1zDX2g.0", + "X-Azure-Ref" : "0+cJlYQAAAACyp4J1BPu0QryRg6XcbWrrUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-41a8-84f5-08482200a768\"}}", + "x-ms-client-request-id" : "bcfffabd-e631-46e9-81f0-9cc4ac87db45", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserAndTokenWithResponse[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserAndTokenWithResponse[1].json index 3a455b417ebce..fbbcc5b3f8c99 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserAndTokenWithResponse[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserAndTokenWithResponse[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "fcd1738d-3bc7-41d1-a188-8ea89295f55d", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "5657eb8d-6da4-47f1-9b4d-c23e5dc23e15", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "920", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:05 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:30 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "226ms", - "MS-CV" : "pWrFb2rnRkqkbUAGlbwWlQ.0", - "X-Azure-Ref" : "0ub3DYAAAAADkcxn7bIuFS6GPmMs1MlzcWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-bf4e-290c-113a0d008360\"},\"accessToken\":{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:04.3730144+00:00\"}}", - "x-ms-client-request-id" : "fcd1738d-3bc7-41d1-a188-8ea89295f55d", + "X-Processing-Time" : "181ms", + "MS-CV" : "Q3iyAbwBPka1Yr5BXjZbIA.0", + "X-Azure-Ref" : "078JlYQAAAAB9KpHfJcq6T7ekioI6s+KlUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-1b9a-e1fe-08482200b5f8\"},\"accessToken\":{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:31.6761042+00:00\"}}", + "x-ms-client-request-id" : "5657eb8d-6da4-47f1-9b4d-c23e5dc23e15", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserAndToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserAndToken[1].json index 6699fd8ac3b92..de764e824ccf1 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserAndToken[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserAndToken[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "68c259cc-7823-4492-a35e-c20053d42f45", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "fc61ac1c-842a-4f0d-b556-f544466f25a1", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "920", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:07 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:33 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "38ms", - "MS-CV" : "LgmHtcYWLkW8YjBLG3+7Cg.0", - "X-Azure-Ref" : "0vL3DYAAAAAD109qfTFWDS5CHJj/AMbbEWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-cac8-02c3-593a0d009c49\"},\"accessToken\":{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:07.1261186+00:00\"}}", - "x-ms-client-request-id" : "68c259cc-7823-4492-a35e-c20053d42f45", + "X-Processing-Time" : "188ms", + "MS-CV" : "hqKr2o+7yUqZM6O9rRacVQ.0", + "X-Azure-Ref" : "08cJlYQAAAADGpmZdKQIcRp6NtWI3WELRUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-23b7-84f5-08482200a764\"},\"accessToken\":{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:33.7578867+00:00\"}}", + "x-ms-client-request-id" : "fc61ac1c-842a-4f0d-b556-f544466f25a1", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserWithContextUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserWithContextUsingManagedIdentity[1].json index 2cc9a965e5595..ebd5ac26de68d 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserWithContextUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserWithContextUsingManagedIdentity[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "76d2ddd1-df09-4ec8-8b01-e95ed411aa75", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "0fed1999-feb5-4411-8414-6d6e1df0027b", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:13 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:37 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "80ms", - "MS-CV" : "qcgeQiofzkuz6+Yip6MGUw.0", - "X-Azure-Ref" : "0wb3DYAAAAAAuzF86QeRERrJxjSynri4AWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-e0a0-290c-113a0d008364\"}}", - "x-ms-client-request-id" : "76d2ddd1-df09-4ec8-8b01-e95ed411aa75", + "X-Processing-Time" : "90ms", + "MS-CV" : "ty9/WaEi40SudZMC3nExwA.0", + "X-Azure-Ref" : "09cJlYQAAAADuXWb85AojSIkBHhrDoLlyUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-33bf-e1fe-08482200b5f9\"}}", + "x-ms-client-request-id" : "0fed1999-feb5-4411-8414-6d6e1df0027b", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserWithResponseUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserWithResponseUsingManagedIdentity[1].json index d493e3cc8475e..16b805664edf6 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserWithResponseUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserWithResponseUsingManagedIdentity[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "cf657a61-4409-42f0-941e-842a71b2661e", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "91320d80-122f-49f4-806d-6ad68bd95d93", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:10 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:34 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "134ms", - "MS-CV" : "9BB0ZcTDDECY1RCwXKjrjg.0", - "X-Azure-Ref" : "0vr3DYAAAAAClGnyQJgS8SZ2HY8PFk3VnWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-d48c-290c-113a0d008363\"}}", - "x-ms-client-request-id" : "cf657a61-4409-42f0-941e-842a71b2661e", + "X-Processing-Time" : "90ms", + "MS-CV" : "33TkidnkY0mk44WZaxJ6Bw.0", + "X-Azure-Ref" : "08sJlYQAAAAC39TuSvN5aRbvLaLxQ/nn+UFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-2930-84f5-08482200a766\"}}", + "x-ms-client-request-id" : "91320d80-122f-49f4-806d-6ad68bd95d93", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserWithResponse[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserWithResponse[1].json index ace6682daaed2..1df1361fee381 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserWithResponse[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUserWithResponse[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b019ee73-d0e6-4e06-89dd-cb1d7ed5ba23", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "7a88c764-c983-4ebc-9ed8-9c676abd609e", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:01 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:29 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "23ms", - "MS-CV" : "gomJ647XikC0s1+9MruEvA.0", - "X-Azure-Ref" : "0tr3DYAAAAACYq+GP9lTlRoZFn7aOD0ujWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-b355-02c3-593a0d009c45\"}}", - "x-ms-client-request-id" : "b019ee73-d0e6-4e06-89dd-cb1d7ed5ba23", + "X-Processing-Time" : "98ms", + "MS-CV" : "OXLWrYInSEaRHm31Xed4kw.0", + "X-Azure-Ref" : "07cJlYQAAAADC/cvDy1F4Q5bo1c13Pg0qUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-146c-83fe-08482200b9f7\"}}", + "x-ms-client-request-id" : "7a88c764-c983-4ebc-9ed8-9c676abd609e", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUser[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUser[1].json index 1e8bcb0e3a005..a8311a5ab56a0 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUser[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.createUser[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "03a6d04b-ae51-4070-9067-11d5ee6eeab4", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "29a017d9-a3a6-40d9-a3c4-394d7328aab4", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:10 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:36 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "30ms", - "MS-CV" : "TjXfKH7ZyEmCrIzN9pSEcw.0", - "X-Azure-Ref" : "0vr3DYAAAAADx8ixP6eUyTKGR67e2S5lJWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-d53e-02c3-593a0d009c4d\"}}", - "x-ms-client-request-id" : "03a6d04b-ae51-4070-9067-11d5ee6eeab4", + "X-Processing-Time" : "97ms", + "MS-CV" : "NaiyMRmIqU6lqFlqM2kA3w.0", + "X-Azure-Ref" : "09MJlYQAAAABc5ya0ynYESI6cx+gRaa0JUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-3165-84f5-08482200a767\"}}", + "x-ms-client-request-id" : "29a017d9-a3a6-40d9-a3c4-394d7328aab4", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUserUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUserUsingManagedIdentity[1].json index 92c1966da88c2..dc3d2dd1ad370 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUserUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUserUsingManagedIdentity[1].json @@ -1,50 +1,50 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "809b8dbf-7f95-412b-8667-774b99122a3a", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "29246721-54d6-4eef-988e-909a6bfa0a5b", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:04 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:29 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "82ms", - "MS-CV" : "YDOrnd6Wu0mtki/zBBFtlA.0", - "X-Azure-Ref" : "0uL3DYAAAAADjHA7iSR0RSp683+Hf269uWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-bc6f-290c-113a0d00835f\"}}", - "x-ms-client-request-id" : "809b8dbf-7f95-412b-8667-774b99122a3a", + "X-Processing-Time" : "91ms", + "MS-CV" : "h4inYAAhFEG/4bg0/22KvA.0", + "X-Azure-Ref" : "07sJlYQAAAACbx0ym3mk9T5xmIn40CTJOUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-1739-e1fe-08482200b5f7\"}}", + "x-ms-client-request-id" : "29246721-54d6-4eef-988e-909a6bfa0a5b", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-bc6f-290c-113a0d00835f?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-1739-e1fe-08482200b5f7?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "7e083685-2a37-42c6-a1cb-c8ceb3139ebd" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "5c865262-7c7b-40a4-9297-3f5bf57dea6a" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "484ms", - "MS-CV" : "DVmIsBIUfkGPE7gBTXYVQQ.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "160ms", + "MS-CV" : "V0N6bkzqh0u0Nf7RFWF/gw.0", "retry-after" : "0", - "X-Azure-Ref" : "0uL3DYAAAAAB+T2olxPgSTJPCc6MdtBUfWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "07sJlYQAAAADBceEAUX5ETJmpSMfh9bdhUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "7e083685-2a37-42c6-a1cb-c8ceb3139ebd", - "Date" : "Fri, 11 Jun 2021 19:47:04 GMT", + "x-ms-client-request-id" : "5c865262-7c7b-40a4-9297-3f5bf57dea6a", + "Date" : "Tue, 12 Oct 2021 17:16:30 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUserWithResponseUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUserWithResponseUsingManagedIdentity[1].json index 05ce0249ed061..2f6b50d712e62 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUserWithResponseUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUserWithResponseUsingManagedIdentity[1].json @@ -1,50 +1,50 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b5b2f76e-bafe-4cc4-83bf-d2d9d81cbc01", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "e0739ac2-10e5-4a50-b1e1-5dcfcd10c4c1", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:46:55 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:22 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "169ms", - "MS-CV" : "XPNxTc13zki43xt2jmiK6g.0", - "X-Azure-Ref" : "0r73DYAAAAAC73IAH+zGRSZi8xW9A9PwTWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-9c1e-02c3-593a0d009c40\"}}", - "x-ms-client-request-id" : "b5b2f76e-bafe-4cc4-83bf-d2d9d81cbc01", + "X-Processing-Time" : "92ms", + "MS-CV" : "Gshv8uWSAEuXXphiq6wRkg.0", + "X-Azure-Ref" : "05sJlYQAAAADTSRBeSoawQ4eL8X4zhTqWUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1562-f743-83fe-08482200b9f5\"}}", + "x-ms-client-request-id" : "e0739ac2-10e5-4a50-b1e1-5dcfcd10c4c1", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-9c1e-02c3-593a0d009c40?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1562-f743-83fe-08482200b9f5?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "0c8c91d2-cd17-4b00-97e9-de825c706c1b" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "2e88ea04-95c3-404b-9059-763d88ec31de" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "790ms", - "MS-CV" : "6e7imkC23EyumuGmNbrlQw.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "254ms", + "MS-CV" : "H/9/CvCs90mvWekISfIb8g.0", "retry-after" : "0", - "X-Azure-Ref" : "0sL3DYAAAAADOZs4NXHjMS647MBX0UJ+1WVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "05sJlYQAAAAC6+8bRJHtjSL9Hf0JUrrYNUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "0c8c91d2-cd17-4b00-97e9-de825c706c1b", - "Date" : "Fri, 11 Jun 2021 19:46:57 GMT", + "x-ms-client-request-id" : "2e88ea04-95c3-404b-9059-763d88ec31de", + "Date" : "Tue, 12 Oct 2021 17:16:22 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUserWithResponse[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUserWithResponse[1].json index b4b684e73780b..60251f1f21552 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUserWithResponse[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUserWithResponse[1].json @@ -1,50 +1,50 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "54a2b2b8-3e24-4c2d-963d-085a4647eb07", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "3f41b5e2-f895-4f06-8659-ee6e65e5d321", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:19 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:40 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "21ms", - "MS-CV" : "A2245nun7kypMiF+JZ/CMw.0", - "X-Azure-Ref" : "0x73DYAAAAAA0yPfWvtECQZ17Pu9YUVJuWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-f8da-02c3-593a0d009c53\"}}", - "x-ms-client-request-id" : "54a2b2b8-3e24-4c2d-963d-085a4647eb07", + "X-Processing-Time" : "97ms", + "MS-CV" : "Egw/S1sPjEmabVkn14CRSw.0", + "X-Azure-Ref" : "0+cJlYQAAAAD1705usF3ZRqRLp2Cqldn3UFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-4338-e1fe-08482200b5fc\"}}", + "x-ms-client-request-id" : "3f41b5e2-f895-4f06-8659-ee6e65e5d321", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-f8da-02c3-593a0d009c53?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-4338-e1fe-08482200b5fc?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "abeb1f76-e6c3-4097-a785-6b9514fb306c" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "15d41046-2aa3-4534-ba75-321725414ab0" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "565ms", - "MS-CV" : "G/4coUTtf0GLSc6hnbyZYw.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "172ms", + "MS-CV" : "yhxSfGhx3Ei/i5X/f2N4VQ.0", "retry-after" : "0", - "X-Azure-Ref" : "0x73DYAAAAAAmk19Yon5EToK0ZNOsshNVWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0+cJlYQAAAAAITCkcS6WnTYEceLTSv2ylUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "abeb1f76-e6c3-4097-a785-6b9514fb306c", - "Date" : "Fri, 11 Jun 2021 19:47:20 GMT", + "x-ms-client-request-id" : "15d41046-2aa3-4534-ba75-321725414ab0", + "Date" : "Tue, 12 Oct 2021 17:16:41 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUser[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUser[1].json index 0e761d73b8812..44d2627322c81 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUser[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.deleteUser[1].json @@ -1,50 +1,50 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "a3f7cfe3-0584-4e80-8c4c-09ad739c0578", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "994be290-97cf-4925-a5c3-5c256e243ce8", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:20 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:41 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "22ms", - "MS-CV" : "UuqD3JGsEUGk+dQo8Cl2qA.0", - "X-Azure-Ref" : "0yL3DYAAAAAC42Pa+nXRrRbQRR1/R7LdLWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-fbca-02c3-593a0d009c54\"}}", - "x-ms-client-request-id" : "a3f7cfe3-0584-4e80-8c4c-09ad739c0578", + "X-Processing-Time" : "91ms", + "MS-CV" : "JggzwY/rlUCnA2okW0meFA.0", + "X-Azure-Ref" : "0+sJlYQAAAABiFY/T8NTsQbu3SbrANcSVUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-4601-e1fe-08482200b5fd\"}}", + "x-ms-client-request-id" : "994be290-97cf-4925-a5c3-5c256e243ce8", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-fbca-02c3-593a0d009c54?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-4601-e1fe-08482200b5fd?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "f22ad39c-2ab9-42b5-aaa6-cf2d1e304d68" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "6f70cfc4-09f8-4116-aa7f-6fcd095af84d" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "573ms", - "MS-CV" : "fupL/KZkQUOrpOt7dE5QFg.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "171ms", + "MS-CV" : "4yeM8AruTkC9e4t6B4AxKw.0", "retry-after" : "0", - "X-Azure-Ref" : "0yL3DYAAAAACaiFO/KgkCRa18ZNh6tWxRWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0+sJlYQAAAADMkxEQfOA7TYUDlmy1taAbUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "f22ad39c-2ab9-42b5-aaa6-cf2d1e304d68", - "Date" : "Fri, 11 Jun 2021 19:47:21 GMT", + "x-ms-client-request-id" : "6f70cfc4-09f8-4116-aa7f-6fcd095af84d", + "Date" : "Tue, 12 Oct 2021 17:16:42 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenUsingManagedIdentity[1].json new file mode 100644 index 0000000000000..d6737d8d70be1 --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenUsingManagedIdentity[1].json @@ -0,0 +1,29 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "70fdd870-d9bc-47ef-902a-d46c319ec20a", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Cache" : "CONFIG_NOCACHE", + "content-length" : "818", + "api-supported-versions" : "2021-03-31-preview1, 2021-10-31-preview", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 12 Oct 2021 17:16:36 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "866ms", + "MS-CV" : "Dkp57mIK/kqsaFmugRgcJw.0", + "X-Azure-Ref" : "088JlYQAAAAAIucq9vDNQRZ48NkPO2oKsUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-12T18:16:34.8765598+00:00\"}", + "x-ms-client-request-id" : "70fdd870-d9bc-47ef-902a-d46c319ec20a", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithEmptyToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithEmptyToken[1].json new file mode 100644 index 0000000000000..9b6e449fce4e8 --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithEmptyToken[1].json @@ -0,0 +1,28 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "0635459d-a10b-4a52-a25a-e8ecd9841278", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Cache" : "CONFIG_NOCACHE", + "retry-after" : "0", + "StatusCode" : "401", + "Date" : "Tue, 12 Oct 2021 17:16:20 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "21ms", + "MS-CV" : "785funH43UunqEikM+E4gA.0", + "X-Azure-Ref" : "05MJlYQAAAADD/Nmbq1ePTYnKm2DFwBzaUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"error\":{\"code\":\"InvalidAccessToken\",\"message\":\"Provided access token is not valid.\"}}", + "x-ms-client-request-id" : "0635459d-a10b-4a52-a25a-e8ecd9841278", + "Content-Type" : "application/json", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithInvalidToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithInvalidToken[1].json new file mode 100644 index 0000000000000..4bd7e5aec5f8f --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithInvalidToken[1].json @@ -0,0 +1,28 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "c6a32b0a-6280-4fe3-ba94-8bb4a03f6f8f", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Cache" : "CONFIG_NOCACHE", + "retry-after" : "0", + "StatusCode" : "401", + "Date" : "Tue, 12 Oct 2021 17:16:23 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "19ms", + "MS-CV" : "VzW8QofP7Em2eYye4vRmSw.0", + "X-Azure-Ref" : "058JlYQAAAAB3RaaNXkfXRI3TfjAgxQ6iUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"error\":{\"code\":\"InvalidAccessToken\",\"message\":\"Provided access token is not valid.\"}}", + "x-ms-client-request-id" : "c6a32b0a-6280-4fe3-ba94-8bb4a03f6f8f", + "Content-Type" : "application/json", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithNull[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithNull[1].json new file mode 100644 index 0000000000000..28a3cbbe9ce0c --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithNull[1].json @@ -0,0 +1,28 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "58def424-022b-4dcb-81ef-5bd3705114c9", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Cache" : "CONFIG_NOCACHE", + "retry-after" : "0", + "StatusCode" : "400", + "Date" : "Tue, 12 Oct 2021 17:16:33 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "0ms", + "MS-CV" : "7dPJNTgIYUCt+NbtRxam1g.0", + "X-Azure-Ref" : "08sJlYQAAAAAGGkeu8TMJQYUlmHGwSfBZUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"error\":{\"code\":\"ValidationError\",\"message\":\"The body is either missing or doesn't contain any token.\"}}", + "x-ms-client-request-id" : "58def424-022b-4dcb-81ef-5bd3705114c9", + "Content-Type" : "application/json", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithResponseUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithResponseUsingManagedIdentity[1].json new file mode 100644 index 0000000000000..e7366f6e46f42 --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithResponseUsingManagedIdentity[1].json @@ -0,0 +1,29 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "6c3cfc35-25c8-464d-9af6-2b19a53834b8", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Cache" : "CONFIG_NOCACHE", + "content-length" : "818", + "api-supported-versions" : "2021-03-31-preview1, 2021-10-31-preview", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 12 Oct 2021 17:16:47 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "927ms", + "MS-CV" : "TgNdXlujpka4V8QLLnm98w.0", + "X-Azure-Ref" : "0/sJlYQAAAADTbpod4Ih2TZWaN5xutrbyUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-12T18:16:44.8131449+00:00\"}", + "x-ms-client-request-id" : "6c3cfc35-25c8-464d-9af6-2b19a53834b8", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithResponse[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithResponse[1].json new file mode 100644 index 0000000000000..ed748aaaa92b8 --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsTokenWithResponse[1].json @@ -0,0 +1,29 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "c947ca4b-4ccd-4a59-9bbe-8adcd37ebd88", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Cache" : "CONFIG_NOCACHE", + "content-length" : "816", + "api-supported-versions" : "2021-03-31-preview1, 2021-10-31-preview", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 12 Oct 2021 17:16:28 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "885ms", + "MS-CV" : "F9V51YPotEOCQdTcswBWsQ.0", + "X-Azure-Ref" : "07MJlYQAAAABSMfgmOwVZS6j2RocuZ+rSUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-12T18:16:27.28383+00:00\"}", + "x-ms-client-request-id" : "c947ca4b-4ccd-4a59-9bbe-8adcd37ebd88", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsToken[1].json new file mode 100644 index 0000000000000..544ebb5357cb6 --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.exchangeTeamsToken[1].json @@ -0,0 +1,29 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "6c02b331-a9bb-41f6-8ee5-5feb4c87f58d", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Cache" : "CONFIG_NOCACHE", + "content-length" : "818", + "api-supported-versions" : "2021-03-31-preview1, 2021-10-31-preview", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 12 Oct 2021 17:16:38 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "382ms", + "MS-CV" : "7Qu+fcfSAUS/xJLMPh9t9Q.0", + "X-Azure-Ref" : "09sJlYQAAAAD0aOPziG5fRr3jXjfiqFqaUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-12T18:16:36.5958436+00:00\"}", + "x-ms-client-request-id" : "6c02b331-a9bb-41f6-8ee5-5feb4c87f58d", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getTokenUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getTokenUsingManagedIdentity[1].json index 845f3c5433d07..e4b6949df45fe 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getTokenUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getTokenUsingManagedIdentity[1].json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b8e71ce7-41d3-4c88-aaa7-0cb424d3f67a", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "1888f8d4-5606-4985-b16e-c571f059a412", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:07 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:32 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "21ms", - "MS-CV" : "NIfIzp21g0uAFz2ZVoJySw.0", - "X-Azure-Ref" : "0u73DYAAAAABYea/GCQITQLCIe4B3Mik5WVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-c941-02c3-593a0d009c48\"}}", - "x-ms-client-request-id" : "b8e71ce7-41d3-4c88-aaa7-0cb424d3f67a", + "X-Processing-Time" : "164ms", + "MS-CV" : "EdkotrBpFU+auASgkr69MA.0", + "X-Azure-Ref" : "08MJlYQAAAABTHKnHNDR+S5sXBln2UcFLUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-204b-84f5-08482200a762\"}}", + "x-ms-client-request-id" : "1888f8d4-5606-4985-b16e-c571f059a412", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-c941-02c3-593a0d009c48/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-204b-84f5-08482200a762/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "27113302-5d9c-4b3a-8f06-d2065aebdf79", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "e103b4b7-7339-4b8e-8e21-6606452b2a83", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:07 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:32 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "149ms", - "MS-CV" : "ekjSpkDXZEiUAKJNjfjlaw.0", - "X-Azure-Ref" : "0u73DYAAAAADFGpa1gRA5TIYRAqYLFo2iWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:06.9394402+00:00\"}", - "x-ms-client-request-id" : "27113302-5d9c-4b3a-8f06-d2065aebdf79", + "X-Processing-Time" : "101ms", + "MS-CV" : "WdXday2nt06A76KiSCWNpA.0", + "X-Azure-Ref" : "08cJlYQAAAAAeKjbZOqLSRpYEQoJJk82qUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:33.2201247+00:00\"}", + "x-ms-client-request-id" : "e103b4b7-7339-4b8e-8e21-6606452b2a83", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getTokenWithResponseUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getTokenWithResponseUsingManagedIdentity[1].json index d00fc4d698dd4..c3834170d5702 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getTokenWithResponseUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getTokenWithResponseUsingManagedIdentity[1].json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "154ef1c7-514a-4ecd-9244-795319b48881", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "e13dd78e-36b8-49b6-973b-35695e8bc257", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:01 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:26 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "21ms", - "MS-CV" : "jXC5b7X8uU+XbNbbPkwNeA.0", - "X-Azure-Ref" : "0tb3DYAAAAACuaxGuaqu2T7gPs78o/UYCWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-b1ec-02c3-593a0d009c44\"}}", - "x-ms-client-request-id" : "154ef1c7-514a-4ecd-9244-795319b48881", + "X-Processing-Time" : "92ms", + "MS-CV" : "5OTgzamyakWXjJVT/8I4HQ.0", + "X-Azure-Ref" : "06sJlYQAAAACtvSdqc6v+S5/vNspJFfTSUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-09cd-e1fe-08482200b5f5\"}}", + "x-ms-client-request-id" : "e13dd78e-36b8-49b6-973b-35695e8bc257", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-b1ec-02c3-593a0d009c44/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-09cd-e1fe-08482200b5f5/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "dcc1755f-1c49-46f6-a892-58bb56c801f1", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "371224e4-4fc3-4bd3-80a7-4539b499b649", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:01 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:27 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "149ms", - "MS-CV" : "7kOUsUHtEEKBoU8WNr8hgw.0", - "X-Azure-Ref" : "0tb3DYAAAAABbOotCw5QDRL2QRkx+buP9WVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:00.9791398+00:00\"}", - "x-ms-client-request-id" : "dcc1755f-1c49-46f6-a892-58bb56c801f1", + "X-Processing-Time" : "99ms", + "MS-CV" : "ACqGgNUfVUWdR8Ou/cH0ug.0", + "X-Azure-Ref" : "068JlYQAAAACSPYEB+PBYQZyvg28PzuVwUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:27.4075178+00:00\"}", + "x-ms-client-request-id" : "371224e4-4fc3-4bd3-80a7-4539b499b649", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getTokenWithResponse[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getTokenWithResponse[1].json index d71bce80d587a..b977dedb78808 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getTokenWithResponse[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getTokenWithResponse[1].json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b317cea8-e0d4-4236-9d66-2beaa4c39ec4", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "4b4a67c6-6e2b-4d2e-a4a7-8978ab98b945", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:13 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:38 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "22ms", - "MS-CV" : "tbXO05IMuEinfHgys3Y35A.0", - "X-Azure-Ref" : "0wb3DYAAAAABIe03b1hJATpcmfpXJLiu4WVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-e161-02c3-593a0d009c4e\"}}", - "x-ms-client-request-id" : "b317cea8-e0d4-4236-9d66-2beaa4c39ec4", + "X-Processing-Time" : "93ms", + "MS-CV" : "ycadD+rgoEeGxQDW+4H88g.0", + "X-Azure-Ref" : "09sJlYQAAAAD/TUIXmtW9Tq8lrfIdcaNJUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-3874-e1fe-08482200b5fa\"}}", + "x-ms-client-request-id" : "4b4a67c6-6e2b-4d2e-a4a7-8978ab98b945", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-e161-02c3-593a0d009c4e/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-3874-e1fe-08482200b5fa/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "11888bee-24f0-42fc-96e2-bf2ee911e93d", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "d8d0c9ad-4f08-4feb-a25c-bdd3dfdd3e44", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:13 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:38 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "154ms", - "MS-CV" : "lVrewHZ/uES2PVkuuVodgA.0", - "X-Azure-Ref" : "0wb3DYAAAAADqvOiBsX1AR7ruWRw5W1bMWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:13.125996+00:00\"}", - "x-ms-client-request-id" : "11888bee-24f0-42fc-96e2-bf2ee911e93d", + "X-Processing-Time" : "112ms", + "MS-CV" : "3XgkGxht802osKx2QaQZCA.0", + "X-Azure-Ref" : "098JlYQAAAABB0sU6FxfjRriVHaIWYAjPUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:39.3846092+00:00\"}", + "x-ms-client-request-id" : "d8d0c9ad-4f08-4feb-a25c-bdd3dfdd3e44", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getToken[1].json index 9c3fb169ca7b1..71d6381a728db 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getToken[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.getToken[1].json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "2ee5abd2-5f60-4991-9d84-f58c633a0c67", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "25842bc4-4325-4289-88e5-808458192c49", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:21 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:43 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "84ms", - "MS-CV" : "j/ClvNuG7Eu9tAH+sDDQvQ.0", - "X-Azure-Ref" : "0yb3DYAAAAABmBBoIjFpiQI1abSM+qn6wWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-ff3b-290c-113a0d008366\"}}", - "x-ms-client-request-id" : "2ee5abd2-5f60-4991-9d84-f58c633a0c67", + "X-Processing-Time" : "92ms", + "MS-CV" : "/niL2F+3dEmlH5outG/4bg.0", + "X-Azure-Ref" : "0+8JlYQAAAACPEQ367GLyTrufQzWr5b2DUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-4a53-84f5-08482200a76a\"}}", + "x-ms-client-request-id" : "25842bc4-4325-4289-88e5-808458192c49", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-ff3b-290c-113a0d008366/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-4a53-84f5-08482200a76a/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "77708c55-1504-41f4-b569-7dff024f8600", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "32a74a1b-b148-47bb-aaa4-6c0eaf11d9df", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:21 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:43 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "30ms", - "MS-CV" : "8ml3ahcZrECYTkANfuIw3g.0", - "X-Azure-Ref" : "0yb3DYAAAAABDYlpPK0GARLawn/N2EU5oWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:20.6971716+00:00\"}", - "x-ms-client-request-id" : "77708c55-1504-41f4-b569-7dff024f8600", + "X-Processing-Time" : "100ms", + "MS-CV" : "TGFeKT31BEWO+tfgPcKtiw.0", + "X-Azure-Ref" : "0+8JlYQAAAAAJCv8J96KIQbX2G2T7AxAQUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:43.8871465+00:00\"}", + "x-ms-client-request-id" : "32a74a1b-b148-47bb-aaa4-6c0eaf11d9df", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeTokenUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeTokenUsingManagedIdentity[1].json index c6cc609e96922..cfc461b7f1cf9 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeTokenUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeTokenUsingManagedIdentity[1].json @@ -1,75 +1,75 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "d2356639-d293-4c0c-8a2b-60d924f777d7", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "caa6e54d-d666-43bb-8f9d-8258f74d52ea", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:16 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:39 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "147ms", - "MS-CV" : "RtzNZwwIgku69y6jX2QzIg.0", - "X-Azure-Ref" : "0xL3DYAAAAABxPcXZ70bVQ77F0U5JKxowWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-ec47-02c3-593a0d009c52\"}}", - "x-ms-client-request-id" : "d2356639-d293-4c0c-8a2b-60d924f777d7", + "X-Processing-Time" : "90ms", + "MS-CV" : "WLkG0WUq802+vHN/8KLVPg.0", + "X-Azure-Ref" : "098JlYQAAAADzuYjAL3IcR4inHeZ+EM/iUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-3c71-e1fe-08482200b5fb\"}}", + "x-ms-client-request-id" : "caa6e54d-d666-43bb-8f9d-8258f74d52ea", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-ec47-02c3-593a0d009c52/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-3c71-e1fe-08482200b5fb/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "c663324b-ff62-4b02-a0d1-ea652f9b95ae", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "01bae31c-cc4f-424e-b1c9-613a8c549c66", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:16 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:39 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "149ms", - "MS-CV" : "bkSrA3SmBEiJ8xNGkJ/nkA.0", - "X-Azure-Ref" : "0xL3DYAAAAAD12Po7z+orTI7/klZCcAxOWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:15.9026166+00:00\"}", - "x-ms-client-request-id" : "c663324b-ff62-4b02-a0d1-ea652f9b95ae", + "X-Processing-Time" : "98ms", + "MS-CV" : "BnD0+tyz30OG/+AEBbS1+w.0", + "X-Azure-Ref" : "0+MJlYQAAAABxFxda9CrsQ6BhbVH7X1EcUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:40.3832058+00:00\"}", + "x-ms-client-request-id" : "01bae31c-cc4f-424e-b1c9-613a8c549c66", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-ec47-02c3-593a0d009c52/:revokeAccessTokens?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-3c71-e1fe-08482200b5fb/:revokeAccessTokens?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b4fe23a7-15f3-4706-acf0-775200df7fb2" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "3ea2d4d3-821c-4b04-ab85-b1b83bfbbc40" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "86ms", - "MS-CV" : "OWpCMoKEVk2jQqRUx6a7+A.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "156ms", + "MS-CV" : "5XMApQJ8gECnkoVUfOWeWg.0", "retry-after" : "0", - "X-Azure-Ref" : "0xb3DYAAAAADurERYUl0yTJXxeAATchskWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0+MJlYQAAAACluWZDPDPeRqLSQ9uEbQcDUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "b4fe23a7-15f3-4706-acf0-775200df7fb2", - "Date" : "Fri, 11 Jun 2021 19:47:16 GMT", + "x-ms-client-request-id" : "3ea2d4d3-821c-4b04-ab85-b1b83bfbbc40", + "Date" : "Tue, 12 Oct 2021 17:16:40 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeTokenWithResponseUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeTokenWithResponseUsingManagedIdentity[1].json index 15280fedbc044..112527270d5a1 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeTokenWithResponseUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeTokenWithResponseUsingManagedIdentity[1].json @@ -1,75 +1,75 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "11a209f0-ece8-476b-a69e-ba32f91e30e1", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "7dcd5420-0918-4de6-a3da-3607be1e4291", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:23 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:44 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "80ms", - "MS-CV" : "W0m9iBig5EqZX792zOYnEQ.0", - "X-Azure-Ref" : "0zL3DYAAAAABSLbXu/DtXRqNfxnL8VGK1WVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-095a-290c-113a0d008367\"}}", - "x-ms-client-request-id" : "11a209f0-ece8-476b-a69e-ba32f91e30e1", + "X-Processing-Time" : "92ms", + "MS-CV" : "7j/E0KE6S0ih/iMPgkD3OA.0", + "X-Azure-Ref" : "0/MJlYQAAAACiTAKAlGO5TIm4xdfQf6I9UFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-4e7e-84f5-08482200a76b\"}}", + "x-ms-client-request-id" : "7dcd5420-0918-4de6-a3da-3607be1e4291", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-095a-290c-113a0d008367/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-4e7e-84f5-08482200a76b/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b49817b4-0549-47c1-a286-bcd24c887229", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "ef65c0ba-9c2c-4806-a956-5760c557d0df", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:23 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:44 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "24ms", - "MS-CV" : "dmP1EV8NP0+ocupeIvJrBg.0", - "X-Azure-Ref" : "0zL3DYAAAAAAGcYV2E8TXTrT2QCEUnmicWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:23.2878343+00:00\"}", - "x-ms-client-request-id" : "b49817b4-0549-47c1-a286-bcd24c887229", + "X-Processing-Time" : "105ms", + "MS-CV" : "GuvjnNNGQ0GESV1TaMroWw.0", + "X-Azure-Ref" : "0/MJlYQAAAABoL4kjlI0qTqor1rrKZxdxUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:45.1121649+00:00\"}", + "x-ms-client-request-id" : "ef65c0ba-9c2c-4806-a956-5760c557d0df", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-095a-290c-113a0d008367/:revokeAccessTokens?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-4e7e-84f5-08482200a76b/:revokeAccessTokens?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "2be782ca-2bcf-482f-b146-9a96e86869b4" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "9f073dc6-5437-483b-b210-c5c643739c98" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "214ms", - "MS-CV" : "n3Rd+Weg6UKRjvY10Jq7zA.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "167ms", + "MS-CV" : "Rifd9wopRU2MYknQ+EDMqg.0", "retry-after" : "0", - "X-Azure-Ref" : "0zL3DYAAAAABuih2wu6uGQZFpHVLYSTrjWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0/cJlYQAAAAA7q8qbas3aS60h2AdhVWhYUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "2be782ca-2bcf-482f-b146-9a96e86869b4", - "Date" : "Fri, 11 Jun 2021 19:47:24 GMT", + "x-ms-client-request-id" : "9f073dc6-5437-483b-b210-c5c643739c98", + "Date" : "Tue, 12 Oct 2021 17:16:45 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeTokenWithResponse[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeTokenWithResponse[1].json index 8c834ce7f35bf..4a81177b0a119 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeTokenWithResponse[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeTokenWithResponse[1].json @@ -1,75 +1,75 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "802a642f-4391-4730-aaac-fac936734c7a", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "bb44bb36-fd1d-4afa-91f1-df847b048fd4", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:46:57 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:23 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "23ms", - "MS-CV" : "1wjMNQAyokOfgl3IZHJvcQ.0", - "X-Azure-Ref" : "0sb3DYAAAAABV7Dmh2AKDTKzzS1aFMzAZWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-a286-02c3-593a0d009c42\"}}", - "x-ms-client-request-id" : "802a642f-4391-4730-aaac-fac936734c7a", + "X-Processing-Time" : "102ms", + "MS-CV" : "SHM0/33KtkedYjdeEWa3nw.0", + "X-Azure-Ref" : "058JlYQAAAAAp0y5q8aUdQLkegKM3U54UUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1562-fe91-e1fe-08482200b5f4\"}}", + "x-ms-client-request-id" : "bb44bb36-fd1d-4afa-91f1-df847b048fd4", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-a286-02c3-593a0d009c42/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1562-fe91-e1fe-08482200b5f4/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "ba42ab0a-16bb-4d91-b434-5b84760b586c", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "707df574-976e-4c30-89a8-6f5a7f02bb05", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:46:58 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:24 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "151ms", - "MS-CV" : "OJNc0+KafEKdLtOz+Y+lMQ.0", - "X-Azure-Ref" : "0sb3DYAAAAACkh08eatBGQLTRBudOJPmHWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:46:57.0354939+00:00\"}", - "x-ms-client-request-id" : "ba42ab0a-16bb-4d91-b434-5b84760b586c", + "X-Processing-Time" : "107ms", + "MS-CV" : "ZZI98G19nkC5XZxg+8EhYg.0", + "X-Azure-Ref" : "06MJlYQAAAAA6KoklAR/fS5/wXsaqWSpcUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:24.5413487+00:00\"}", + "x-ms-client-request-id" : "707df574-976e-4c30-89a8-6f5a7f02bb05", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-a286-02c3-593a0d009c42/:revokeAccessTokens?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1562-fe91-e1fe-08482200b5f4/:revokeAccessTokens?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9d62a161-b92a-45ed-90bc-1a9eed09d8ed" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "4c4983c6-30df-46b7-82f4-8b003eba63f2" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "87ms", - "MS-CV" : "TZybUDliaUyqbC7uWn7jIw.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "160ms", + "MS-CV" : "0eNpsgtMaUO8hNodhDUzgw.0", "retry-after" : "0", - "X-Azure-Ref" : "0sr3DYAAAAAC9srD853rRS5VIg+Nap9h6WVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "06MJlYQAAAAAp8AW8hpGWSqjqEloQozTdUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "9d62a161-b92a-45ed-90bc-1a9eed09d8ed", - "Date" : "Fri, 11 Jun 2021 19:46:58 GMT", + "x-ms-client-request-id" : "4c4983c6-30df-46b7-82f4-8b003eba63f2", + "Date" : "Tue, 12 Oct 2021 17:16:24 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeToken[1].json index ef8e335fad9a4..fdee02e1205b8 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeToken[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityAsyncTests.revokeToken[1].json @@ -1,75 +1,75 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "29132b98-60eb-43cd-9345-1876f92e916b", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "4780dd25-70b1-47aa-a4cc-c12e4ccc7b56", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:46:58 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:25 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "82ms", - "MS-CV" : "5MKzO35BLEG+A92JuoSkEA.0", - "X-Azure-Ref" : "0sr3DYAAAAACpPgyYHxoHQLlncybZ/iIxWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-a675-290c-113a0d00835d\"}}", - "x-ms-client-request-id" : "29132b98-60eb-43cd-9345-1876f92e916b", + "X-Processing-Time" : "99ms", + "MS-CV" : "p6s1kokblUqKWJckAkJJrg.0", + "X-Azure-Ref" : "06cJlYQAAAABHb5RUFOPWQY1w23khAy5NUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-039b-83fe-08482200b9f6\"}}", + "x-ms-client-request-id" : "4780dd25-70b1-47aa-a4cc-c12e4ccc7b56", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-a675-290c-113a0d00835d/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-039b-83fe-08482200b9f6/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "2e23cb3b-ad21-4314-a630-0e521c8e1c8f", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "8897c9a8-8399-49f1-b981-bad9f89662f1", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:46:58 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:25 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "30ms", - "MS-CV" : "Nhm8Pw3i9EeGJ/dzO8TtmA.0", - "X-Azure-Ref" : "0sr3DYAAAAABKUz/Os+wSTpv4SXEDDR7TWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:46:57.9826067+00:00\"}", - "x-ms-client-request-id" : "2e23cb3b-ad21-4314-a630-0e521c8e1c8f", + "X-Processing-Time" : "102ms", + "MS-CV" : "/QAo1hAbBEuAIKdC31hamg.0", + "X-Azure-Ref" : "06cJlYQAAAACxjErPCq9zTqYdhHpp2VHCUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:25.8551052+00:00\"}", + "x-ms-client-request-id" : "8897c9a8-8399-49f1-b981-bad9f89662f1", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7e-a675-290c-113a0d00835d/:revokeAccessTokens?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-039b-83fe-08482200b9f6/:revokeAccessTokens?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "32dc96f4-a3b3-455d-9f3b-ecbcc478737a" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "12947128-f7bc-4015-9b0b-5e4829db7de0" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "281ms", - "MS-CV" : "spvCIZauuEWez5XNiRv/iw.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "172ms", + "MS-CV" : "qFqgOXpC/kmXUGk7oprSaQ.0", "retry-after" : "0", - "X-Azure-Ref" : "0s73DYAAAAAB06z6JCsWeTKjXGgInds/DWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "06sJlYQAAAABe8F45uU/JTZrfqElm8lCNUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "32dc96f4-a3b3-455d-9f3b-ecbcc478737a", - "Date" : "Fri, 11 Jun 2021 19:46:59 GMT", + "x-ms-client-request-id" : "12947128-f7bc-4015-9b0b-5e4829db7de0", + "Date" : "Tue, 12 Oct 2021 17:16:26 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createIdentityClientUsingConnectionString[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createIdentityClientUsingConnectionString[1].json index 61c978ca2e1dd..8eb545bceb052 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createIdentityClientUsingConnectionString[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createIdentityClientUsingConnectionString[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "02d099c8-a280-47ba-adf1-e08069aba038", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "d973c339-6edd-4152-b9e7-b8c242b94991", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:24 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:47 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "23ms", - "MS-CV" : "kCQmZ/u1I0i3SAxdTfOn0g.0", - "X-Azure-Ref" : "0zL3DYAAAAACdc1o8lkp7SrpuTUL14HZoWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-0bb9-02c3-593a0d009c57\"}}", - "x-ms-client-request-id" : "02d099c8-a280-47ba-adf1-e08069aba038", + "X-Processing-Time" : "91ms", + "MS-CV" : "7G0HGH24SECWb/GcqEm1zA.0", + "X-Azure-Ref" : "0AMNlYQAAAABQRsx7c1i/RabV9QOpPussUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-5eaf-e1fe-08482200b603\"}}", + "x-ms-client-request-id" : "d973c339-6edd-4152-b9e7-b8c242b94991", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createIdentityClientUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createIdentityClientUsingManagedIdentity[1].json index af687219a9ea4..99aa57ce0152e 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createIdentityClientUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createIdentityClientUsingManagedIdentity[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "521f272c-3640-4c3d-968b-1135eaae1d71", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "cf18c380-3d8a-4504-aef3-d8836dd47123", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:38 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:57 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "80ms", - "MS-CV" : "6RTD9M6kgUOk0u49fB28qQ.0", - "X-Azure-Ref" : "0273DYAAAAAByQ4mEpldzQruxTA2lxvgDWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-4442-740a-113a0d008d52\"}}", - "x-ms-client-request-id" : "521f272c-3640-4c3d-968b-1135eaae1d71", + "X-Processing-Time" : "93ms", + "MS-CV" : "VUFGWdQn0E+oWZp/3rv7lw.0", + "X-Azure-Ref" : "0CsNlYQAAAAAIdtUnylN9QLF8C03u0OVeUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-845e-88f7-08482200b074\"}}", + "x-ms-client-request-id" : "cf18c380-3d8a-4504-aef3-d8836dd47123", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserAndTokenWithResponseNullContext[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserAndTokenWithResponseNullContext[1].json index 3af8eee0ffc4d..969fd2dda1e15 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserAndTokenWithResponseNullContext[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserAndTokenWithResponseNullContext[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "d947f3be-1c80-417d-8603-c96e87617ef5", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "475c7e05-1619-4af7-afbe-569b2c5305e3", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "920", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:24 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:48 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "284ms", - "MS-CV" : "O/c08/Q37kaHxPzdcXeGRg.0", - "X-Azure-Ref" : "0zL3DYAAAAADpUbDhnjmcTpb8upWGJKQAWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-0c2d-290c-113a0d008368\"},\"accessToken\":{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:24.1133157+00:00\"}}", - "x-ms-client-request-id" : "d947f3be-1c80-417d-8603-c96e87617ef5", + "X-Processing-Time" : "202ms", + "MS-CV" : "Y+uq7iY0JkuBU4Pwv2Q6vQ.0", + "X-Azure-Ref" : "0AcNlYQAAAABytaNw9rjVSY+bID2bf4GfUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-606b-84f5-08482200a772\"},\"accessToken\":{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:49.3014759+00:00\"}}", + "x-ms-client-request-id" : "475c7e05-1619-4af7-afbe-569b2c5305e3", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserAndTokenWithResponse[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserAndTokenWithResponse[1].json index 2499b7a70d04d..240d64676c7a7 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserAndTokenWithResponse[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserAndTokenWithResponse[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "8219271d-d162-4b04-b241-0eb3aeed1a84", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "9a674f4a-d063-4740-ab0a-3b8700a3a50d", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "920", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:38 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:58 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "33ms", - "MS-CV" : "8D0tOSZ20Uy678kz1KVURQ.0", - "X-Azure-Ref" : "0273DYAAAAABKMyMUuwX2RqaSwfrIv/iIWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-450d-02c3-593a0d009c64\"},\"accessToken\":{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:38.4231091+00:00\"}}", - "x-ms-client-request-id" : "8219271d-d162-4b04-b241-0eb3aeed1a84", + "X-Processing-Time" : "189ms", + "MS-CV" : "OY05qbukr0OV966HhjeZmg.0", + "X-Azure-Ref" : "0CsNlYQAAAACynFUh+/FWS40rCE4CpoDVUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-8658-84f5-08482200a778\"},\"accessToken\":{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:59.0114123+00:00\"}}", + "x-ms-client-request-id" : "9a674f4a-d063-4740-ab0a-3b8700a3a50d", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserAndToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserAndToken[1].json index 9a857a6a836b3..82ba292804f8d 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserAndToken[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserAndToken[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "6bbd963c-d546-4a12-ae7e-66819e9dd02a", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "6778a984-c353-41aa-94cd-ffb2a3c9c9d5", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "920", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:41 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:59 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "227ms", - "MS-CV" : "1TdEtp0e8kCKo+cnHht+1A.0", - "X-Azure-Ref" : "03r3DYAAAAAC0UhTtTT2ZTKgCqNFD+P0eWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-4fc3-740a-113a0d008d56\"},\"accessToken\":{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:41.3582707+00:00\"}}", - "x-ms-client-request-id" : "6bbd963c-d546-4a12-ae7e-66819e9dd02a", + "X-Processing-Time" : "191ms", + "MS-CV" : "QOnUHgSzYUy2Rn4XnOqsvg.0", + "X-Azure-Ref" : "0DMNlYQAAAAAsVE0zxm0JSZ0Uxbna63K6UFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-8c0e-88f7-08482200b076\"},\"accessToken\":{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:17:00.4740288+00:00\"}}", + "x-ms-client-request-id" : "6778a984-c353-41aa-94cd-ffb2a3c9c9d5", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserWithResponseUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserWithResponseUsingManagedIdentity[1].json index 93c84950bf9e6..3ba6c58788aab 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserWithResponseUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserWithResponseUsingManagedIdentity[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "2c75fce8-02c0-4eb9-9955-48bec3868fc9", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "b5210083-cae8-42d1-98df-1f8edb2fc019", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:46 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:03 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "83ms", - "MS-CV" : "DMgh5xI9/EyoW5bn6BFehw.0", - "X-Azure-Ref" : "04r3DYAAAAABrKhyh609pQ7huTqWyW3qIWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-609f-740a-113a0d008d59\"}}", - "x-ms-client-request-id" : "2c75fce8-02c0-4eb9-9955-48bec3868fc9", + "X-Processing-Time" : "90ms", + "MS-CV" : "k+6TqfH3U02EPH6paY8sjg.0", + "X-Azure-Ref" : "0D8NlYQAAAAB2ZinSlLRUQ6iIRTu0yQgiUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-9a6f-84f5-08482200a77a\"}}", + "x-ms-client-request-id" : "b5210083-cae8-42d1-98df-1f8edb2fc019", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserWithResponse[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserWithResponse[1].json index ebcd0af67e20a..70a6e2f4fa46c 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserWithResponse[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUserWithResponse[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "e8316317-903a-47fc-a858-6ad2916bdae5", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "062c6135-e148-4a78-ba89-597212a900a3", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:33 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:56 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "23ms", - "MS-CV" : "hU+wrtWO/0uqmnSSVmu5/A.0", - "X-Azure-Ref" : "01b3DYAAAAABqW9rTYBYnQrywWtX7mv9kWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-2ee2-02c3-593a0d009c63\"}}", - "x-ms-client-request-id" : "e8316317-903a-47fc-a858-6ad2916bdae5", + "X-Processing-Time" : "96ms", + "MS-CV" : "/TKCPuizfkCfrRZw/PzFzw.0", + "X-Azure-Ref" : "0CMNlYQAAAAA7PAVS517ORaq7ICAt/7lKUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-7d8e-84f5-08482200a777\"}}", + "x-ms-client-request-id" : "062c6135-e148-4a78-ba89-597212a900a3", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUser[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUser[1].json index d124053106240..940ed1fab83fe 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUser[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.createUser[1].json @@ -1,29 +1,29 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "e19bcdbd-1ae7-4e07-beb8-4ce0e169e321", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "0c4e5890-4561-4005-a4ea-c777d19dd5d8", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:45 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:05 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "23ms", - "MS-CV" : "0I3izFwtHEy2uwZhUHipJA.0", - "X-Azure-Ref" : "04r3DYAAAAAB1Y/FQgZviQYg3paHAL6CpWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-6148-02c3-593a0d009c67\"}}", - "x-ms-client-request-id" : "e19bcdbd-1ae7-4e07-beb8-4ce0e169e321", + "X-Processing-Time" : "95ms", + "MS-CV" : "2W+jkJzNP0eyQyDaYC15Yw.0", + "X-Azure-Ref" : "0EsNlYQAAAADmOcaQ8LTaS6YA+uX7eOQUUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-a2e3-84f5-08482200a77d\"}}", + "x-ms-client-request-id" : "0c4e5890-4561-4005-a4ea-c777d19dd5d8", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserUsingManagedIdentity[1].json index 45f1e9f36d362..adfdba955c3d3 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserUsingManagedIdentity[1].json @@ -1,50 +1,50 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "c2a4c74c-5c69-4cdc-a17f-38a44d4d0844", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "002122b5-416b-4396-ba07-bb8f203789cf", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:35 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:56 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "83ms", - "MS-CV" : "mwynLMRaeE6oGfUd3eHcDA.0", - "X-Azure-Ref" : "02L3DYAAAAADASn4wOC98RKQZOTsdis5OWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-3830-740a-113a0d008d4f\"}}", - "x-ms-client-request-id" : "c2a4c74c-5c69-4cdc-a17f-38a44d4d0844", + "X-Processing-Time" : "95ms", + "MS-CV" : "iVxhvFtem0Sy8gMeewqStg.0", + "X-Azure-Ref" : "0CcNlYQAAAAC+OZlS7uFlQ4lE1OjgdcAgUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-7ffc-88f7-08482200b073\"}}", + "x-ms-client-request-id" : "002122b5-416b-4396-ba07-bb8f203789cf", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-3830-740a-113a0d008d4f?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-7ffc-88f7-08482200b073?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "6a8f6f25-f8ea-4010-a0da-4daf108bd787" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "1d5a7ac8-edc5-4af0-8e16-2f9d6314930b" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "446ms", - "MS-CV" : "oIlL9XD/x0ekyA507AULuw.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "158ms", + "MS-CV" : "76Q22NlFKUesoC3cQXbjxA.0", "retry-after" : "0", - "X-Azure-Ref" : "02L3DYAAAAAAkVQTzb999TphN8jGQlqrEWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0CcNlYQAAAAAzmvd4lvYPQ7PKmL1MWCAuUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "6a8f6f25-f8ea-4010-a0da-4daf108bd787", - "Date" : "Fri, 11 Jun 2021 19:47:36 GMT", + "x-ms-client-request-id" : "1d5a7ac8-edc5-4af0-8e16-2f9d6314930b", + "Date" : "Tue, 12 Oct 2021 17:16:57 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserWithResponseUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserWithResponseUsingManagedIdentity[1].json index 77898b51eae98..4bd03d1497b5b 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserWithResponseUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserWithResponseUsingManagedIdentity[1].json @@ -1,50 +1,50 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "a2c6967a-0fa7-4321-bf7f-7c116cc0ba68", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "34f3277d-1581-4402-bef8-2355ae2a1326", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:28 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:49 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "17ms", - "MS-CV" : "VFw8Qn3RVkqCON63ysMM2w.0", - "X-Azure-Ref" : "00L3DYAAAAAD6Hez5bdckTLYKU5DBy4BnWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-1bc3-02c3-593a0d009c5a\"}}", - "x-ms-client-request-id" : "a2c6967a-0fa7-4321-bf7f-7c116cc0ba68", + "X-Processing-Time" : "266ms", + "MS-CV" : "MV+fq81R0E6zc/RIwjRQ7A.0", + "X-Azure-Ref" : "0AcNlYQAAAABrWPG/Ydf6RISOKUvsXFdhUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-63fe-e1fe-08482200b604\"}}", + "x-ms-client-request-id" : "34f3277d-1581-4402-bef8-2355ae2a1326", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-1bc3-02c3-593a0d009c5a?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-63fe-e1fe-08482200b604?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9fa22d9e-d795-4e72-a168-fb9452592dd2" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "fa4ff752-4e46-4898-aeb0-d8f2ba771e4f" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "502ms", - "MS-CV" : "Xz5SjQ9G3kO0b5oiCprYCg.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "296ms", + "MS-CV" : "jqlZd+bUTkKPE+p7W6QRgg.0", "retry-after" : "0", - "X-Azure-Ref" : "00L3DYAAAAAA4fnha4TwHTrUuIlh+ErKCWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0AsNlYQAAAAA2qDFTJSSTRq8aVFLi7FbbUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "9fa22d9e-d795-4e72-a168-fb9452592dd2", - "Date" : "Fri, 11 Jun 2021 19:47:29 GMT", + "x-ms-client-request-id" : "fa4ff752-4e46-4898-aeb0-d8f2ba771e4f", + "Date" : "Tue, 12 Oct 2021 17:16:50 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserWithResponseWithNullContext[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserWithResponseWithNullContext[1].json index 8f51d8f4b43f6..4ab5fa1b28b98 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserWithResponseWithNullContext[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserWithResponseWithNullContext[1].json @@ -1,50 +1,50 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "eb6052ee-f36e-4fa7-ba07-a62c6d229fac", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "e84d0a99-8419-4441-a177-233570791938", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:42 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:01 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "85ms", - "MS-CV" : "AjT4fMbTCUyRancEBXJ53Q.0", - "X-Azure-Ref" : "03r3DYAAAAABgBQn+6EnsTaz4JlI3kvxoWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-53b9-740a-113a0d008d57\"}}", - "x-ms-client-request-id" : "eb6052ee-f36e-4fa7-ba07-a62c6d229fac", + "X-Processing-Time" : "96ms", + "MS-CV" : "clTdTZ66YkGdqa2U5GqqrQ.0", + "X-Azure-Ref" : "0DcNlYQAAAAA1ZNiyhYNgT7FoEdY+6RoTUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-926e-88f7-08482200b077\"}}", + "x-ms-client-request-id" : "e84d0a99-8419-4441-a177-233570791938", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-53b9-740a-113a0d008d57?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-926e-88f7-08482200b077?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "e5ecf1b9-32a0-465a-a05d-d5190ebe67f6" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "ce622622-27cf-47db-b7d4-f7966e2ddfe8" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "425ms", - "MS-CV" : "ih6qt7hKe0qBb9NNB0hDdw.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "164ms", + "MS-CV" : "iTvwh+l12Uq0vEAYrUFlDw.0", "retry-after" : "0", - "X-Azure-Ref" : "0373DYAAAAACFV6QoDtX4Ta3vYpv8X/E1WVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0DsNlYQAAAACyAIOvTAWMRrIEX4SWQKddUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "e5ecf1b9-32a0-465a-a05d-d5190ebe67f6", - "Date" : "Fri, 11 Jun 2021 19:47:42 GMT", + "x-ms-client-request-id" : "ce622622-27cf-47db-b7d4-f7966e2ddfe8", + "Date" : "Tue, 12 Oct 2021 17:17:01 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserWithResponse[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserWithResponse[1].json index 7a0367b3c8e0d..3bd980be88967 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserWithResponse[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUserWithResponse[1].json @@ -1,50 +1,50 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "7f3f88e5-86aa-4d73-b3c9-6243618bf45a", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "274dcf71-08dd-4f19-a779-ca21a392e850", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:49 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:08 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "21ms", - "MS-CV" : "oO2WmSu6E02nLGGwH/P0IQ.0", - "X-Azure-Ref" : "05r3DYAAAAADa0xvvKcnUTJRZllFYbcM+WVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-6ef8-02c3-593a0d009c68\"}}", - "x-ms-client-request-id" : "7f3f88e5-86aa-4d73-b3c9-6243618bf45a", + "X-Processing-Time" : "97ms", + "MS-CV" : "mV5h0KH6XkyYVs45eV7Img.0", + "X-Azure-Ref" : "0FcNlYQAAAAASBPAk7huiRqhk7BEhQ8CjUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-b0a8-88f7-08482200b07b\"}}", + "x-ms-client-request-id" : "274dcf71-08dd-4f19-a779-ca21a392e850", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-6ef8-02c3-593a0d009c68?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-b0a8-88f7-08482200b07b?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "1eabdca3-5e22-47f1-9a6d-2b570677c7ae" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "42a4aaac-dc01-4337-b5f2-1b8c24970a67" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "669ms", - "MS-CV" : "7cBmlBZIGEi5ClRP5vGDEg.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "165ms", + "MS-CV" : "xH+N3vreUEOpB2+O93ShTg.0", "retry-after" : "0", - "X-Azure-Ref" : "05r3DYAAAAAArdMzEUbHLQYSGSZqUC90OWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0FcNlYQAAAADyubtkRnpZSrQOzqAwElTRUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "1eabdca3-5e22-47f1-9a6d-2b570677c7ae", - "Date" : "Fri, 11 Jun 2021 19:47:50 GMT", + "x-ms-client-request-id" : "42a4aaac-dc01-4337-b5f2-1b8c24970a67", + "Date" : "Tue, 12 Oct 2021 17:17:09 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUser[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUser[1].json index 07bb45059e000..8e1c027664327 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUser[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.deleteUser[1].json @@ -1,50 +1,50 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "1f900ca5-b89f-46ff-b883-930a8a308bd2", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "76e67f8e-a7bd-45de-8db9-fe46fd5ae389", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:50 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:09 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "30ms", - "MS-CV" : "mNcRwk/DtEau7yON6wHUDQ.0", - "X-Azure-Ref" : "05r3DYAAAAADpOJKpRh9tSJTMMnoosSQ+WVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-7243-02c3-593a0d009c6a\"}}", - "x-ms-client-request-id" : "1f900ca5-b89f-46ff-b883-930a8a308bd2", + "X-Processing-Time" : "95ms", + "MS-CV" : "sei7qlp/DUuEW/xxE0jYqA.0", + "X-Azure-Ref" : "0FsNlYQAAAACdQ3yvT2muRJQuYqQ8X0JmUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-b33e-88f7-08482200b07c\"}}", + "x-ms-client-request-id" : "76e67f8e-a7bd-45de-8db9-fe46fd5ae389", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "DELETE", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-7243-02c3-593a0d009c6a?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-b33e-88f7-08482200b07c?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "e93fcd6b-4d1b-49e0-a91f-13fc4c822adc" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "c704af8c-2e90-4af6-af3f-aced8a0c8ceb" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "659ms", - "MS-CV" : "qLwhO9GvbUCH7k0aemmxkQ.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "161ms", + "MS-CV" : "AZxqHtRndUuI90cmzeaiJQ.0", "retry-after" : "0", - "X-Azure-Ref" : "0573DYAAAAABZZWYiBd8VS6Mo9TIu+6ejWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0FsNlYQAAAADNvSFgSIk3Rb5UHDL0rprVUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "e93fcd6b-4d1b-49e0-a91f-13fc4c822adc", - "Date" : "Fri, 11 Jun 2021 19:47:51 GMT", + "x-ms-client-request-id" : "c704af8c-2e90-4af6-af3f-aced8a0c8ceb", + "Date" : "Tue, 12 Oct 2021 17:17:10 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenUsingManagedIdentity[1].json new file mode 100644 index 0000000000000..eeb3655705dfc --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenUsingManagedIdentity[1].json @@ -0,0 +1,29 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "bf7c2fe2-98f7-473a-a2aa-d7a58f4af606", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Cache" : "CONFIG_NOCACHE", + "content-length" : "818", + "api-supported-versions" : "2021-03-31-preview1, 2021-10-31-preview", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 12 Oct 2021 17:17:05 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "459ms", + "MS-CV" : "a2E1GUVmRkafNbM6rbtMpw.0", + "X-Azure-Ref" : "0EcNlYQAAAAAx3VyvLzd/T6K9SdyMOlOFUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-12T18:17:03.9251517+00:00\"}", + "x-ms-client-request-id" : "bf7c2fe2-98f7-473a-a2aa-d7a58f4af606", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithEmptyToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithEmptyToken[1].json new file mode 100644 index 0000000000000..2b223e747b6e2 --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithEmptyToken[1].json @@ -0,0 +1,28 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "6cd30e3e-1959-4fff-ada2-b611efdcdec5", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Cache" : "CONFIG_NOCACHE", + "retry-after" : "0", + "StatusCode" : "401", + "Date" : "Tue, 12 Oct 2021 17:16:47 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "19ms", + "MS-CV" : "gpixEhg6LUq3Fb7MgFxltg.0", + "X-Azure-Ref" : "0AMNlYQAAAABpQNuJ4d5QSJYaRrLs8ygtUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"error\":{\"code\":\"InvalidAccessToken\",\"message\":\"Provided access token is not valid.\"}}", + "x-ms-client-request-id" : "6cd30e3e-1959-4fff-ada2-b611efdcdec5", + "Content-Type" : "application/json", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithExpiredToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithExpiredToken[1].json new file mode 100644 index 0000000000000..84523f091ab40 --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithExpiredToken[1].json @@ -0,0 +1,28 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "2d8dd084-03fb-4f40-8461-c190bb47db1f", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Cache" : "CONFIG_NOCACHE", + "retry-after" : "0", + "StatusCode" : "401", + "Date" : "Tue, 12 Oct 2021 17:16:54 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "30ms", + "MS-CV" : "uRACriVGbUagmQcvWvEEJA.0", + "X-Azure-Ref" : "0B8NlYQAAAAAA4O5dBwWqQ4UlzYkSKJy1UFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"error\":{\"code\":\"InvalidAccessToken\",\"message\":\"Provided access token is not valid.\"}}", + "x-ms-client-request-id" : "2d8dd084-03fb-4f40-8461-c190bb47db1f", + "Content-Type" : "application/json", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithInvalidToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithInvalidToken[1].json new file mode 100644 index 0000000000000..27daba9b91442 --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithInvalidToken[1].json @@ -0,0 +1,28 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "d010d8ed-be53-4416-b206-64b03ceadd66", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Cache" : "CONFIG_NOCACHE", + "retry-after" : "0", + "StatusCode" : "401", + "Date" : "Tue, 12 Oct 2021 17:16:50 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "22ms", + "MS-CV" : "pKUD6B9tK0mJGRbkPJwArA.0", + "X-Azure-Ref" : "0AsNlYQAAAADDQqIjDlUmTJvLpOXkavgwUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"error\":{\"code\":\"InvalidAccessToken\",\"message\":\"Provided access token is not valid.\"}}", + "x-ms-client-request-id" : "d010d8ed-be53-4416-b206-64b03ceadd66", + "Content-Type" : "application/json", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithNull[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithNull[1].json new file mode 100644 index 0000000000000..32a688b3869e4 --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithNull[1].json @@ -0,0 +1,28 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "79f97208-149b-426e-8e08-6a73731d1d17", + "Content-Type" : "application/json" + }, + "Response" : { + "Transfer-Encoding" : "chunked", + "X-Cache" : "CONFIG_NOCACHE", + "retry-after" : "0", + "StatusCode" : "400", + "Date" : "Tue, 12 Oct 2021 17:17:02 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "0ms", + "MS-CV" : "SRamd+3pckq/vx7+gEi+ug.0", + "X-Azure-Ref" : "0D8NlYQAAAACguEJuGGq4RJtPYNx8vkKAUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"error\":{\"code\":\"ValidationError\",\"message\":\"The body is either missing or doesn't contain any token.\"}}", + "x-ms-client-request-id" : "79f97208-149b-426e-8e08-6a73731d1d17", + "Content-Type" : "application/json", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithResponseUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithResponseUsingManagedIdentity[1].json new file mode 100644 index 0000000000000..24520b8b8b77a --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithResponseUsingManagedIdentity[1].json @@ -0,0 +1,29 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "460f7836-81fe-4a76-8eed-324fc9e60051", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Cache" : "CONFIG_NOCACHE", + "content-length" : "818", + "api-supported-versions" : "2021-03-31-preview1, 2021-10-31-preview", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 12 Oct 2021 17:17:13 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "346ms", + "MS-CV" : "/b1YcLNV+Uy91ciQwcR3OA.0", + "X-Azure-Ref" : "0GcNlYQAAAADidbKcqmpyT6ed1tLOEShLUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-12T18:17:12.0388862+00:00\"}", + "x-ms-client-request-id" : "460f7836-81fe-4a76-8eed-324fc9e60051", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithValidTokenWithResponse[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithValidTokenWithResponse[1].json new file mode 100644 index 0000000000000..d1323214847c2 --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithValidTokenWithResponse[1].json @@ -0,0 +1,29 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "b83db90a-3b7c-491b-afab-7951aa607663", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Cache" : "CONFIG_NOCACHE", + "content-length" : "817", + "api-supported-versions" : "2021-03-31-preview1, 2021-10-31-preview", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 12 Oct 2021 17:17:06 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "443ms", + "MS-CV" : "iJ9DchEsVku2AxnqtMWZRg.0", + "X-Azure-Ref" : "0EsNlYQAAAAAvlYSTtfd8Ra9mrldFe8KsUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-12T18:17:05.123741+00:00\"}", + "x-ms-client-request-id" : "b83db90a-3b7c-491b-afab-7951aa607663", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithValidToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithValidToken[1].json new file mode 100644 index 0000000000000..fe18530a70f85 --- /dev/null +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.exchangeTeamsTokenWithValidToken[1].json @@ -0,0 +1,29 @@ +{ + "networkCallRecords" : [ { + "Method" : "POST", + "Uri" : "https://REDACTED.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "Headers" : { + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "3ed5b72e-a166-4676-b863-b27df982a6c0", + "Content-Type" : "application/json" + }, + "Response" : { + "X-Cache" : "CONFIG_NOCACHE", + "content-length" : "818", + "api-supported-versions" : "2021-03-31-preview1, 2021-10-31-preview", + "retry-after" : "0", + "StatusCode" : "200", + "Date" : "Tue, 12 Oct 2021 17:16:51 GMT", + "Strict-Transport-Security" : "max-age=2592000", + "X-Processing-Time" : "431ms", + "MS-CV" : "qsVE8R0OL0Ooce3m5GDttw.0", + "X-Azure-Ref" : "0A8NlYQAAAABgYVj3nBKCQKkvQCuwhgJXUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-12T18:16:49.1526701+00:00\"}", + "x-ms-client-request-id" : "3ed5b72e-a166-4676-b863-b27df982a6c0", + "Content-Type" : "application/json; charset=utf-8", + "Request-Context" : "appId=" + }, + "Exception" : null + } ], + "variables" : [ ] +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenUsingManagedIdentity[1].json index ffbbfdccd1eba..c5eee98d03fb2 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenUsingManagedIdentity[1].json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "09297b3c-a54a-495a-99f9-82c362a23eba", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "06eeed78-270d-427b-b492-64871c4a66ca", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:41 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:58 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "82ms", - "MS-CV" : "WcTijvpwIUe2OrMBbIZ5Mg.0", - "X-Azure-Ref" : "03b3DYAAAAAAPHQ56ZmGNQbKwMecDjltRWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-4ea9-740a-113a0d008d55\"}}", - "x-ms-client-request-id" : "09297b3c-a54a-495a-99f9-82c362a23eba", + "X-Processing-Time" : "92ms", + "MS-CV" : "OpV9jlO10Uu6sFVS+DwFKQ.0", + "X-Azure-Ref" : "0C8NlYQAAAADQsjY/wswWRLhxGi1MovkqUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-88e6-88f7-08482200b075\"}}", + "x-ms-client-request-id" : "06eeed78-270d-427b-b492-64871c4a66ca", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-4ea9-740a-113a0d008d55/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-88e6-88f7-08482200b075/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "a5ca96f8-f548-4677-8c8f-7b39e1e0ddef", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "08188373-6616-44ee-afda-f8e43430eb9c", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "803", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:41 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:59 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "26ms", - "MS-CV" : "cpIJH+Q4c0yOdqgN/sMvTg.0", - "X-Azure-Ref" : "03r3DYAAAAAC6Ft52s3s3S4ZJzmhcEJUaWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:41.0423044+00:00\"}", - "x-ms-client-request-id" : "a5ca96f8-f548-4677-8c8f-7b39e1e0ddef", + "X-Processing-Time" : "104ms", + "MS-CV" : "VlVrXzX65kCpRa105NWHIg.0", + "X-Azure-Ref" : "0C8NlYQAAAAC0baCwwIvFRojEdHvBZvLDUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:59.986286+00:00\"}", + "x-ms-client-request-id" : "08188373-6616-44ee-afda-f8e43430eb9c", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenWithResponseNullContext[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenWithResponseNullContext[1].json index a2f03553333db..2c2d7171d9631 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenWithResponseNullContext[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenWithResponseNullContext[1].json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "37c6bb38-6285-45b6-b6a0-ee4efa5bfa41", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "ad5625ee-5fdb-456f-b4bf-42e9382cb79e", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:43 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:02 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "96ms", - "MS-CV" : "nohWt6Xdx0WhFjB2voq3rQ.0", - "X-Azure-Ref" : "0373DYAAAAAD1j3Lfum41TKPgRpwgSzhuWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-5688-740a-113a0d008d58\"}}", - "x-ms-client-request-id" : "37c6bb38-6285-45b6-b6a0-ee4efa5bfa41", + "X-Processing-Time" : "95ms", + "MS-CV" : "w5PHS8mI40G0631finKiYg.0", + "X-Azure-Ref" : "0DsNlYQAAAAA2RRt0D8FKQoLTsdUWwC9hUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-958a-88f7-08482200b078\"}}", + "x-ms-client-request-id" : "ad5625ee-5fdb-456f-b4bf-42e9382cb79e", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-5688-740a-113a0d008d58/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-958a-88f7-08482200b078/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "1222e8d6-ef46-4eaa-861a-92b4b40846cd", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "abc891e9-81f4-41bf-86ea-87033be3f215", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:43 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:02 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "29ms", - "MS-CV" : "Vwo1r8ixo0CimjZsjbtViQ.0", - "X-Azure-Ref" : "04L3DYAAAAADTkJqD9nDWTKFCEBYnfHKwWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:43.0616418+00:00\"}", - "x-ms-client-request-id" : "1222e8d6-ef46-4eaa-861a-92b4b40846cd", + "X-Processing-Time" : "111ms", + "MS-CV" : "Zi0/di42dUGDr+NwztCWBg.0", + "X-Azure-Ref" : "0D8NlYQAAAABiHj0Wob2wR6S9e0CMuwTgUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:17:03.2376535+00:00\"}", + "x-ms-client-request-id" : "abc891e9-81f4-41bf-86ea-87033be3f215", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenWithResponseUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenWithResponseUsingManagedIdentity[1].json index 9a009296ca0f1..534d439c92cf1 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenWithResponseUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenWithResponseUsingManagedIdentity[1].json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "f069ef19-3dd6-44a4-aa87-f61bfa9992f9", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "76781f5a-e6ed-4461-ad42-be29fbe87ef2", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:32 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:55 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "17ms", - "MS-CV" : "Z9n7gMsgfUSVLtnsFPXgbg.0", - "X-Azure-Ref" : "01b3DYAAAAABETZj1RpscRLiZYQzXJQmnWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-2da0-02c3-593a0d009c62\"}}", - "x-ms-client-request-id" : "f069ef19-3dd6-44a4-aa87-f61bfa9992f9", + "X-Processing-Time" : "93ms", + "MS-CV" : "bvHI7+OepkGekvq6XrdmVg.0", + "X-Azure-Ref" : "0B8NlYQAAAADefXujosrkQb/0q3FZZe5nUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-7b00-84f5-08482200a776\"}}", + "x-ms-client-request-id" : "76781f5a-e6ed-4461-ad42-be29fbe87ef2", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-2da0-02c3-593a0d009c62/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-7b00-84f5-08482200a776/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "bff79041-2952-4127-9df9-f5e20f8fcd61", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "10bce43d-ee83-4885-9551-0dc3554cff08", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:33 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:55 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "145ms", - "MS-CV" : "vaFikQNgOkStRNiQazZxkw.0", - "X-Azure-Ref" : "01b3DYAAAAACSsgjyt9itRK2m0sorCMOoWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:32.6335246+00:00\"}", - "x-ms-client-request-id" : "bff79041-2952-4127-9df9-f5e20f8fcd61", + "X-Processing-Time" : "103ms", + "MS-CV" : "z3j+zFNcakWV4VXC0C3XLA.0", + "X-Azure-Ref" : "0CMNlYQAAAACYOJW+PTjnTYSFTlTWR4aPUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:56.3700541+00:00\"}", + "x-ms-client-request-id" : "10bce43d-ee83-4885-9551-0dc3554cff08", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenWithResponse[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenWithResponse[1].json index 39b070c35e2f7..176334bbc6d9c 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenWithResponse[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getTokenWithResponse[1].json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "763fbd5b-05b3-4669-8523-b44761b95903", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "c1e34070-3705-46d6-a840-f8cf4b0ab588", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:46 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:06 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "85ms", - "MS-CV" : "CQsDgzH9nk6j+wcN0evgNA.0", - "X-Azure-Ref" : "04r3DYAAAAABLvHSqPo6qTr5FTbOdik3HWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-61ae-740a-113a0d008d5a\"}}", - "x-ms-client-request-id" : "763fbd5b-05b3-4669-8523-b44761b95903", + "X-Processing-Time" : "94ms", + "MS-CV" : "P7A6K/hYXkutj795DIiLfA.0", + "X-Azure-Ref" : "0E8NlYQAAAABrwmm4mFAbTIbfQQbcfZHwUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-a7fa-84f5-08482200a77f\"}}", + "x-ms-client-request-id" : "c1e34070-3705-46d6-a840-f8cf4b0ab588", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-61ae-740a-113a0d008d5a/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-a7fa-84f5-08482200a77f/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "693c5ebf-e1a2-44fe-bcc0-97385a55762b", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "8d146b16-d22d-4ad3-a7bc-4b60f3dfe255", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:46 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:07 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "30ms", - "MS-CV" : "LdbnIScC7kmM3jz7bs4xdg.0", - "X-Azure-Ref" : "04r3DYAAAAAAJwNXniTQYT5fXT9Z/A6knWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:45.9045739+00:00\"}", - "x-ms-client-request-id" : "693c5ebf-e1a2-44fe-bcc0-97385a55762b", + "X-Processing-Time" : "106ms", + "MS-CV" : "6SmBFAXwTkiEH+0mxKjZ0w.0", + "X-Azure-Ref" : "0E8NlYQAAAADYW3y3HOi2SYEWI14Jpr2IUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:17:07.9225999+00:00\"}", + "x-ms-client-request-id" : "8d146b16-d22d-4ad3-a7bc-4b60f3dfe255", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getToken[1].json index 4710974484f49..b062ac95bbebf 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getToken[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.getToken[1].json @@ -1,54 +1,54 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "57a856c7-d655-4024-8fc1-599bee8530af", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "72437f75-482c-43b1-86fc-ce0f049fb8e6", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:50 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:10 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "22ms", - "MS-CV" : "bzc0TEVoZka2lUoIvqE0Wg.0", - "X-Azure-Ref" : "0573DYAAAAABGAAkyyeyET6M/MiwYaZ0OWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-7593-02c3-593a0d009c6b\"}}", - "x-ms-client-request-id" : "57a856c7-d655-4024-8fc1-599bee8530af", + "X-Processing-Time" : "97ms", + "MS-CV" : "XPJNRjjB2EClK2KrkYzPSg.0", + "X-Azure-Ref" : "0FsNlYQAAAAAJFZ9BdhP7RYykctYzZvnqUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-b611-88f7-08482200b07d\"}}", + "x-ms-client-request-id" : "72437f75-482c-43b1-86fc-ce0f049fb8e6", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-7593-02c3-593a0d009c6b/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-b611-88f7-08482200b07d/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "5f60aa05-4ba2-4d44-97de-e04e14879c75", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "98179ac8-0855-4173-b573-4a1d215c3bd9", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:51 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:10 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "154ms", - "MS-CV" : "vMw85oJOT0qmT642b1BhwA.0", - "X-Azure-Ref" : "0573DYAAAAAClusRnV2ZfSr/uf9LYp69DWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:51.0592109+00:00\"}", - "x-ms-client-request-id" : "5f60aa05-4ba2-4d44-97de-e04e14879c75", + "X-Processing-Time" : "104ms", + "MS-CV" : "DhBy/4Ccz0Sbx0bXNS+SiA.0", + "X-Azure-Ref" : "0F8NlYQAAAABT2aYF5fxPSoxznG4IJgOdUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:17:11.4481263+00:00\"}", + "x-ms-client-request-id" : "98179ac8-0855-4173-b573-4a1d215c3bd9", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenUsingManagedIdentity[1].json index ba7e50d175dfc..e801a0aff4850 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenUsingManagedIdentity[1].json @@ -1,75 +1,75 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "522293a1-000e-4c5f-9393-9b18f5e1b528", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "9ceb5d13-f54d-4c23-89b3-1a66c730b1b0", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:49 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:07 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "78ms", - "MS-CV" : "GrYiu25EakO89YYuKTxf4w.0", - "X-Azure-Ref" : "05b3DYAAAAADVa26rQBYRSKwx0Bo6qbSMWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-6c7a-740a-113a0d008d5d\"}}", - "x-ms-client-request-id" : "522293a1-000e-4c5f-9393-9b18f5e1b528", + "X-Processing-Time" : "90ms", + "MS-CV" : "taNo7eWc40mYqg3DK2/ZoA.0", + "X-Azure-Ref" : "0FMNlYQAAAAC1yA5Qfyd2R78ab1dzJq/fUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-abf3-84f5-08482200a780\"}}", + "x-ms-client-request-id" : "9ceb5d13-f54d-4c23-89b3-1a66c730b1b0", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-6c7a-740a-113a0d008d5d/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-abf3-84f5-08482200a780/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "f0ad7db0-e42b-435d-9c7c-5368611fc3bf", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "799ef232-03ab-4690-8bb3-a6ca3c35f376", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:48 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:08 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "24ms", - "MS-CV" : "vGBPPKKwskiDv3xQC/xZRw.0", - "X-Azure-Ref" : "05b3DYAAAAACwkh38cTlhRZWwib4DT3TuWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:48.6687926+00:00\"}", - "x-ms-client-request-id" : "f0ad7db0-e42b-435d-9c7c-5368611fc3bf", + "X-Processing-Time" : "101ms", + "MS-CV" : "ZQMY4WkvNEK30yqRtaaLiw.0", + "X-Azure-Ref" : "0FMNlYQAAAADIW5K1XfcmT5sOhU/9c/6xUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:17:08.9764323+00:00\"}", + "x-ms-client-request-id" : "799ef232-03ab-4690-8bb3-a6ca3c35f376", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-6c7a-740a-113a0d008d5d/:revokeAccessTokens?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-abf3-84f5-08482200a780/:revokeAccessTokens?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "68d4a724-260e-4333-a26e-1b10a25d302e" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "83254468-c0fc-4b26-8f6e-b560005ef013" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "271ms", - "MS-CV" : "M2FC85aatESOLha5BPSUzw.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "165ms", + "MS-CV" : "tjJ0/LrK1U2/7zCldeyZpQ.0", "retry-after" : "0", - "X-Azure-Ref" : "05b3DYAAAAABP3eosL+9MSbJUY3CWLR3qWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0FcNlYQAAAABJ5cSogMYZT5+5PF0eRjqXUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "68d4a724-260e-4333-a26e-1b10a25d302e", - "Date" : "Fri, 11 Jun 2021 19:47:49 GMT", + "x-ms-client-request-id" : "83254468-c0fc-4b26-8f6e-b560005ef013", + "Date" : "Tue, 12 Oct 2021 17:17:08 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenWithResponseNullContext[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenWithResponseNullContext[1].json index d007eb005fb57..1af4df5b4aea2 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenWithResponseNullContext[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenWithResponseNullContext[1].json @@ -1,75 +1,75 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "fd6a0fbb-6721-43fd-b41d-2c30c50ad6e8", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "c8de6961-85b0-45ce-9715-8cecf139d0cb", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:41 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:00 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "20ms", - "MS-CV" : "u8QNb5w1C0Wx6p5oZgku5w.0", - "X-Azure-Ref" : "03r3DYAAAAADsMbIAjZa1Tr0WGEZT9MniWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-5125-02c3-593a0d009c65\"}}", - "x-ms-client-request-id" : "fd6a0fbb-6721-43fd-b41d-2c30c50ad6e8", + "X-Processing-Time" : "99ms", + "MS-CV" : "Tqm7WHBCp0Syz2ya6Wsr3Q.0", + "X-Azure-Ref" : "0DMNlYQAAAAAoGYmPguyNSLVIu8tCgyU6UFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-8d8e-84f5-08482200a779\"}}", + "x-ms-client-request-id" : "c8de6961-85b0-45ce-9715-8cecf139d0cb", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-5125-02c3-593a0d009c65/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-8d8e-84f5-08482200a779/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "2ebb875d-335d-4802-8375-40b177ce9b21", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "3bc6b4b2-7c25-4f68-8017-0ef36dac92db", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:42 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:00 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "156ms", - "MS-CV" : "UXSTsXe57E6r/qfMxydS0w.0", - "X-Azure-Ref" : "03r3DYAAAAAAsJWOt5woMS7QPh9XKlRyQWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:41.7449193+00:00\"}", - "x-ms-client-request-id" : "2ebb875d-335d-4802-8375-40b177ce9b21", + "X-Processing-Time" : "112ms", + "MS-CV" : "aZFKS0ogzE2UT1PVrYsxlg.0", + "X-Azure-Ref" : "0DcNlYQAAAACxozsn5gf6QZQxfMkw2PzdUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:17:01.2099356+00:00\"}", + "x-ms-client-request-id" : "3bc6b4b2-7c25-4f68-8017-0ef36dac92db", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-5125-02c3-593a0d009c65/:revokeAccessTokens?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-8d8e-84f5-08482200a779/:revokeAccessTokens?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b45c2eae-aa77-492d-bd24-08d524865c96" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "02ef5ef9-83b5-408b-8689-082a0cfd1e20" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "89ms", - "MS-CV" : "zLSAFiAb0k6YJGb7iITM/w.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "171ms", + "MS-CV" : "+8pArbsq3EGSiRcZ9CseXg.0", "retry-after" : "0", - "X-Azure-Ref" : "03r3DYAAAAAB1V2WuJXvzTbnORTqmg/etWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0DcNlYQAAAAAn0aErN9E8QqeO8SxUBPx5UFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "b45c2eae-aa77-492d-bd24-08d524865c96", - "Date" : "Fri, 11 Jun 2021 19:47:42 GMT", + "x-ms-client-request-id" : "02ef5ef9-83b5-408b-8689-082a0cfd1e20", + "Date" : "Tue, 12 Oct 2021 17:17:01 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenWithResponseUsingManagedIdentity[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenWithResponseUsingManagedIdentity[1].json index 3dd48fa10f32b..0a05673768291 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenWithResponseUsingManagedIdentity[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenWithResponseUsingManagedIdentity[1].json @@ -1,75 +1,75 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "c0384061-8f9d-4120-b569-61ab2c46f5b0", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "b9ab88f3-95d1-490e-9e15-064515413f89", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:53 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:11 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "17ms", - "MS-CV" : "6afa+0+vFkCHpUDZSi4GIg.0", - "X-Azure-Ref" : "06r3DYAAAAADfQMBZy43BRZav5t0F1XFLWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-80ca-02c3-593a0d009c6c\"}}", - "x-ms-client-request-id" : "c0384061-8f9d-4120-b569-61ab2c46f5b0", + "X-Processing-Time" : "104ms", + "MS-CV" : "O9uSBMWgAE6Kgx3rCbSe5Q.0", + "X-Azure-Ref" : "0F8NlYQAAAAD3Q8moHb2mQrw3N9S5/pL+UFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-b927-88f7-08482200b07e\"}}", + "x-ms-client-request-id" : "b9ab88f3-95d1-490e-9e15-064515413f89", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-80ca-02c3-593a0d009c6c/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-b927-88f7-08482200b07e/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "9160848c-04ed-4848-af91-19437f5e6a4c", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "f9b21a4a-8ff0-4c2e-b2de-1a7faa2ac67d", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:54 GMT", + "Date" : "Tue, 12 Oct 2021 17:17:11 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "150ms", - "MS-CV" : "paEYO6uHgkWnLsYZgM8PYQ.0", - "X-Azure-Ref" : "06r3DYAAAAABW0px7PDvZSa6RyTv7Z0dlWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:53.9306383+00:00\"}", - "x-ms-client-request-id" : "9160848c-04ed-4848-af91-19437f5e6a4c", + "X-Processing-Time" : "101ms", + "MS-CV" : "GtUzQzZMPUqg6kblRAcX7A.0", + "X-Azure-Ref" : "0GMNlYQAAAADJNAw9K3V+SrruLuzw8nyYUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:17:12.4058001+00:00\"}", + "x-ms-client-request-id" : "f9b21a4a-8ff0-4c2e-b2de-1a7faa2ac67d", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-80ca-02c3-593a0d009c6c/:revokeAccessTokens?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-b927-88f7-08482200b07e/:revokeAccessTokens?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "6b28d129-3bf5-4604-b273-035eff50a261" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "125fea85-cb51-4f5b-aff6-244227145525" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "91ms", - "MS-CV" : "RILopvXgmUS3Fm8nUlaexw.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "164ms", + "MS-CV" : "NIT3qqA1qUmyPmqXEi4bjg.0", "retry-after" : "0", - "X-Azure-Ref" : "06r3DYAAAAADjRqg35vYJS6sjm36mGGtuWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0GMNlYQAAAADUcf5NalNrS5QXYF0Le0yDUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "6b28d129-3bf5-4604-b273-035eff50a261", - "Date" : "Fri, 11 Jun 2021 19:47:54 GMT", + "x-ms-client-request-id" : "125fea85-cb51-4f5b-aff6-244227145525", + "Date" : "Tue, 12 Oct 2021 17:17:12 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenWithResponse[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenWithResponse[1].json index a8c9b128f59a2..7f972513c1471 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenWithResponse[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeTokenWithResponse[1].json @@ -1,75 +1,75 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "7143a662-87b4-435a-b170-f89ef8fb3032", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "a0fa24a3-dde4-4a06-88be-35109c48fdca", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:29 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:51 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "21ms", - "MS-CV" : "DVL/7PWzfE6rnLnbnca6nw.0", - "X-Azure-Ref" : "00b3DYAAAAABiePp+9BxhRZlCNghO6+sUWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-1f94-02c3-593a0d009c5b\"}}", - "x-ms-client-request-id" : "7143a662-87b4-435a-b170-f89ef8fb3032", + "X-Processing-Time" : "91ms", + "MS-CV" : "u5TGzmbt1USAIQZqaBNNvw.0", + "X-Azure-Ref" : "0BMNlYQAAAAAc69JO1k0HTYq9iQbU90lfUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-6d2b-e1fe-08482200b605\"}}", + "x-ms-client-request-id" : "a0fa24a3-dde4-4a06-88be-35109c48fdca", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-1f94-02c3-593a0d009c5b/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-6d2b-e1fe-08482200b605/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "8e46d3d3-36c7-416b-8c82-e3b0ef0146a6", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "bb6158da-1cbb-40a4-9770-54a44407570f", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:29 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:52 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "156ms", - "MS-CV" : "sC1BwhjVQ0aSOuxa3ygajA.0", - "X-Azure-Ref" : "00b3DYAAAAADIvOAcFaVRQYwKPOKh52aFWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:29.0444917+00:00\"}", - "x-ms-client-request-id" : "8e46d3d3-36c7-416b-8c82-e3b0ef0146a6", + "X-Processing-Time" : "102ms", + "MS-CV" : "65VxO5tMnkahdGVhGVVuHw.0", + "X-Azure-Ref" : "0BMNlYQAAAAADQHQCAAQAQ4lqeotTWboFUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:52.9133362+00:00\"}", + "x-ms-client-request-id" : "bb6158da-1cbb-40a4-9770-54a44407570f", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-1f94-02c3-593a0d009c5b/:revokeAccessTokens?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-6d2b-e1fe-08482200b605/:revokeAccessTokens?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "2118d132-7ff9-4d00-a9f0-8d0bb44e97a5" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "dcb952d1-bba5-40e7-8706-1113690b5e12" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "91ms", - "MS-CV" : "cKVeh5YCT0WNmjexo8c5xw.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "161ms", + "MS-CV" : "uWsvC3GVVEqtJ1ay6G7Mkw.0", "retry-after" : "0", - "X-Azure-Ref" : "00r3DYAAAAAAqp7s0n9o4Ra5JXe2vQLzkWVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0BcNlYQAAAACK6A//sE9YTLKdWVn7NuPxUFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "2118d132-7ff9-4d00-a9f0-8d0bb44e97a5", - "Date" : "Fri, 11 Jun 2021 19:47:29 GMT", + "x-ms-client-request-id" : "dcb952d1-bba5-40e7-8706-1113690b5e12", + "Date" : "Tue, 12 Oct 2021 17:16:52 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeToken[1].json b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeToken[1].json index f5f411e993b30..16ba464dd6fff 100644 --- a/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeToken[1].json +++ b/sdk/communication/azure-communication-identity/src/test/resources/session-records/CommunicationIdentityTests.revokeToken[1].json @@ -1,75 +1,75 @@ { "networkCallRecords" : [ { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "b12b6be3-4e3b-41ee-b094-74ef646924e3", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "ba1b12eb-f8bc-41a4-a3b9-3d440e2668a3", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "101", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "201", - "Date" : "Fri, 11 Jun 2021 19:47:30 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:53 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "82ms", - "MS-CV" : "dY6GV+brRkmCS9Fq+XbwJQ.0", - "X-Azure-Ref" : "00r3DYAAAAAATdRo0jUg+RJPPmI4vtoHOWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"identity\":{\"id\":\"8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-21ae-740a-113a0d008d4d\"}}", - "x-ms-client-request-id" : "b12b6be3-4e3b-41ee-b094-74ef646924e3", + "X-Processing-Time" : "98ms", + "MS-CV" : "/Ar65ZoxlEayX4por+ZcLQ.0", + "X-Azure-Ref" : "0BcNlYQAAAAAEX6mXj82ZTZh49ZZ+SQ90UFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"identity\":{\"id\":\"8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-7200-84f5-08482200a773\"}}", + "x-ms-client-request-id" : "ba1b12eb-f8bc-41a4-a3b9-3d440e2668a3", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-21ae-740a-113a0d008d4d/:issueAccessToken?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-7200-84f5-08482200a773/:issueAccessToken?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "fc9eb63e-7ffb-4aec-9f4e-ff6da4ba4c37", + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "24c8cfd8-4ba9-4812-949e-d3cdefa0b35e", "Content-Type" : "application/json" }, "Response" : { - "Transfer-Encoding" : "chunked", "X-Cache" : "CONFIG_NOCACHE", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", + "content-length" : "804", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", "retry-after" : "0", "StatusCode" : "200", - "Date" : "Fri, 11 Jun 2021 19:47:29 GMT", + "Date" : "Tue, 12 Oct 2021 17:16:53 GMT", "Strict-Transport-Security" : "max-age=2592000", - "X-Processing-Time" : "30ms", - "MS-CV" : "AauGwyA6MUacUhH7O9kk2w.0", - "X-Azure-Ref" : "00r3DYAAAAABtHPbfqnC7RbmeO/VSHJG4WVZSMzBFREdFMDQxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", - "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-06-12T19:47:29.5505927+00:00\"}", - "x-ms-client-request-id" : "fc9eb63e-7ffb-4aec-9f4e-ff6da4ba4c37", + "X-Processing-Time" : "122ms", + "MS-CV" : "B+uNGCgVKEisOis4+dPEVg.0", + "X-Azure-Ref" : "0BcNlYQAAAAApzjz/uVWVT4N0vfX7Whb7UFJHMDFFREdFMDcyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "Body" : "{\"token\":\"REDACTED\",\"expiresOn\":\"2021-10-13T17:16:54.6387542+00:00\"}", + "x-ms-client-request-id" : "24c8cfd8-4ba9-4812-949e-d3cdefa0b35e", "Content-Type" : "application/json; charset=utf-8", "Request-Context" : "appId=" }, "Exception" : null }, { "Method" : "POST", - "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:ac80d96a-85de-48b1-995d-a3a3fa3627c8_0000000a-9c7f-21ae-740a-113a0d008d4d/:revokeAccessTokens?api-version=2021-03-07", + "Uri" : "https://REDACTED.communication.azure.com/identities/8:acs:a5ba7870-ef05-4e2b-9901-7751faa29e20_0000000d-1563-7200-84f5-08482200a773/:revokeAccessTokens?api-version=2021-10-31-preview", "Headers" : { - "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.7; Windows 10; 10.0)", - "x-ms-client-request-id" : "c6bfd590-991a-4ef5-8311-24516bd9082f" + "User-Agent" : "azsdk-java-azure-communication-identity/1.2.0-beta.1 (11.0.12; Mac OS X; 11.6)", + "x-ms-client-request-id" : "3a41c3d3-003a-4483-9e30-7b9866c71564" }, "Response" : { "X-Cache" : "CONFIG_NOCACHE", "Strict-Transport-Security" : "max-age=2592000", - "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1", - "X-Processing-Time" : "217ms", - "MS-CV" : "cAyzFuEYfUawK2PPuMXSTw.0", + "api-supported-versions" : "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", + "X-Processing-Time" : "180ms", + "MS-CV" : "ifHQTUhoDEiCEBwdeOHDMw.0", "retry-after" : "0", - "X-Azure-Ref" : "00r3DYAAAAACC6db9A7OVRLB7wLIUZZNkWVZSMzBFREdFMDQwNwA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "X-Azure-Ref" : "0BsNlYQAAAAB2+uXpovWBTbL87tSYrk/oUFJHMDFFREdFMDYxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", "StatusCode" : "204", - "x-ms-client-request-id" : "c6bfd590-991a-4ef5-8311-24516bd9082f", - "Date" : "Fri, 11 Jun 2021 19:47:30 GMT", + "x-ms-client-request-id" : "3a41c3d3-003a-4483-9e30-7b9866c71564", + "Date" : "Tue, 12 Oct 2021 17:16:54 GMT", "Request-Context" : "appId=" }, "Exception" : null } ], "variables" : [ ] -} \ No newline at end of file +} diff --git a/sdk/communication/azure-communication-identity/swagger/README.md b/sdk/communication/azure-communication-identity/swagger/README.md index 108cd4c1afe92..1f39393721acb 100644 --- a/sdk/communication/azure-communication-identity/swagger/README.md +++ b/sdk/communication/azure-communication-identity/swagger/README.md @@ -19,15 +19,15 @@ npm install -g autorest ```ps cd -autorest README.md --java --v4 --use=@autorest/java@4.0.2 +autorest README.md --java --v4 --use=@autorest/java@4.0.2X ``` ### Code generation settings ``` yaml -tag: package-2021-03-07 -require: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/896d05e37dbb00712726620b8d679cc3c3be09fb/specification/communication/data-plane/Identity/readme.md +tag: package-preview-2021-10 +require: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/6f40b65610a4fad7a03f3fe8c57e8c0a9c3b77d0/specification/communication/data-plane/Identity/readme.md add-context-parameter: true -custom-types: CommunicationIdentityTokenScope, CommunicationTokenScope +custom-types: CommunicationTokenScope custom-types-subpackage: models models-subpackage: implementation.models ``` diff --git a/sdk/communication/azure-communication-networktraversal/src/test/java/com/azure/communication/networktraversal/CommunicationRelayClientTestBase.java b/sdk/communication/azure-communication-networktraversal/src/test/java/com/azure/communication/networktraversal/CommunicationRelayClientTestBase.java index 1c630f5a68d8a..280388a38dfe9 100644 --- a/sdk/communication/azure-communication-networktraversal/src/test/java/com/azure/communication/networktraversal/CommunicationRelayClientTestBase.java +++ b/sdk/communication/azure-communication-networktraversal/src/test/java/com/azure/communication/networktraversal/CommunicationRelayClientTestBase.java @@ -5,6 +5,7 @@ import com.azure.communication.common.implementation.CommunicationConnectionString; import com.azure.communication.identity.CommunicationIdentityClientBuilder; +import com.azure.communication.identity.CommunicationIdentityServiceVersion; import com.azure.core.credential.AccessToken; import com.azure.core.credential.AzureKeyCredential; import com.azure.core.credential.TokenCredential; @@ -107,6 +108,7 @@ protected CommunicationIdentityClientBuilder createClientIdentityBuilderUsingMan builder .endpoint(communicationEndpoint) + .serviceVersion(CommunicationIdentityServiceVersion.V2021_03_07) .httpClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient); if (getTestMode() == TestMode.PLAYBACK) { @@ -144,6 +146,7 @@ protected CommunicationIdentityClientBuilder createIdentityClientBuilder(HttpCli CommunicationIdentityClientBuilder builder = new CommunicationIdentityClientBuilder(); builder .connectionString(CONNECTION_STRING) + .serviceVersion(CommunicationIdentityServiceVersion.V2021_03_07) .httpClient(httpClient == null ? interceptorManager.getPlaybackClient() : httpClient); if (getTestMode() == TestMode.RECORD) {