diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_communication_identity_client.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_communication_identity_client.py index 6c00a7f912ad..8c6d275f93f6 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_communication_identity_client.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_communication_identity_client.py @@ -105,7 +105,7 @@ def create_user_with_token( ~azure.communication.identity.CommunicationIdentityToken) """ return self._identity_service_client.communication_identity.create( - cls=lambda pr, u, e: CommunicationUserIdentifier(u.identity.id), + cls=lambda pr, u, e: (CommunicationUserIdentifier(u.identity.id), u.access_token), create_token_with_scopes=scopes, **kwargs) diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user.yaml index bc64aafcef68..54de7a065de3 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 27 Jan 2021 23:54:39 GMT + - Thu, 28 Jan 2021 18:17:17 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -22,22 +22,22 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:713bd27c-3c73-4c55-a3d2-11c120d32fa8_00000007-e626-e90a-6216-1f3a0d003bb4"}}' + string: '{"identity": {"id": "8:acs:f823ebe3-93ab-46d6-82a0-29e7f8e18877_00000007-ea18-6094-0e04-343a0d000438"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 23:54:40 GMT + - Thu, 28 Jan 2021 18:17:16 GMT ms-cv: - - V3Rpav/bY0WZnu7vMclLog.0 + - CvM4lDVC8ECvD7/H/t27oQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 229ms + - 17ms status: code: 201 message: Created diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_from_managed_identity.yaml index 67a09dedbd90..677ef6cf8c08 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_from_managed_identity.yaml @@ -18,22 +18,22 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:3de2c19f-8f12-45ac-a978-5fe327284a35_00000007-e627-f129-ac00-343a0d00b106"}}' + string: '{"identity": {"id": "8:acs:f8a47a4f-7f0a-4010-a42d-594ddb4d35f3_00000007-ea19-697d-8d33-3b3a0d000262"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 23:55:48 GMT + - Thu, 28 Jan 2021 18:18:24 GMT ms-cv: - - iocVB67Og0KRosYwvJnZlg.0 + - XgP1JYSRKE+0gaEXB6KWYA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 183ms + - 495ms status: code: 201 message: Created diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_with_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_with_token.yaml new file mode 100644 index 000000000000..c9b8a19b7857 --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_with_token.yaml @@ -0,0 +1,46 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + Date: + - Thu, 28 Jan 2021 18:19:32 GMT + User-Agent: + - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 + response: + body: + string: '{"identity": {"id": "8:acs:f5294985-c25d-4372-80f9-bb43572e72b2_00000007-ea1a-6e54-6032-3b3a0d0002c2"}, + "accessToken": {"token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwMiIsIng1dCI6IjNNSnZRYzhrWVNLd1hqbEIySmx6NTRQVzNBYyIsInR5cCI6IkpXVCJ9.eyJza3lwZWlkIjoiYWNzOmY1Mjk0OTg1LWMyNWQtNDM3Mi04MGY5LWJiNDM1NzJlNzJiMl8wMDAwMDAwNy1lYTFhLTZlNTQtNjAzMi0zYjNhMGQwMDAyYzIiLCJzY3AiOjE3OTIsImNzaSI6IjE2MTE4NTc5NzEiLCJpYXQiOjE2MTE4NTc5NzEsImV4cCI6MTYxMTk0NDM3MSwiYWNzU2NvcGUiOiJjaGF0IiwicmVzb3VyY2VJZCI6ImY1Mjk0OTg1LWMyNWQtNDM3Mi04MGY5LWJiNDM1NzJlNzJiMiJ9.PYfUH9RNvccMK-GvC2EFO8DZ3Zx916yPW0OfaAvrTbf1IToRuFEoKznlvwi7h2zqfqKrA6bNAXGHwRDA8H32uYgIiw5U-BeWc00xXQhTiVpwZgQDjR-my2U_1l8eblV7PZH7BJ35uf115HJQP-s5jQ202PqJwKwMvBS01RvttH4w3wSSXTPlgkdvSMTFA7T3nkY3cGHDuMnLHZepzspgca0MtrF0rxx0q4XQH1gWYKBN3hfDh2FMQmn-cqHH4cSrWwNLuaBnWGptUoYA0g00FAmjOX4gtT5xFyyZ9TvZoSSr332qP-_c8U-EmM4uIJTI8UR21cV-n3uz50FQhnsqRg", + "expiresOn": "2021-01-29T18:19:30.8206627+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-03-07 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 28 Jan 2021 18:19:31 GMT + ms-cv: + - W/TJoPYQyUW0JJtdk5ZYIw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-processing-time: + - 97ms + status: + code: 201 + message: Created +version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user.yaml index 1feba48bb56c..df1e91b14d9e 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 27 Jan 2021 23:56:55 GMT + - Thu, 28 Jan 2021 18:20:40 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -22,22 +22,22 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:b040bbd1-fb13-465b-a547-44c5ff20b980_00000007-e628-f9f8-3ef0-8b3a0d003d3d"}}' + string: '{"identity": {"id": "8:acs:ec8aa781-2f38-49c7-86a2-bfdece4cc21c_00000007-ea1b-789a-6a0b-343a0d00031a"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 23:56:55 GMT + - Thu, 28 Jan 2021 18:20:39 GMT ms-cv: - - lv7eyX3+o0SgYHigmvhZNw.0 + - rSGjhLYPdEu2zAqKwy2o1Q.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 214ms + - 32ms status: code: 201 message: Created @@ -53,7 +53,7 @@ interactions: Content-Length: - '0' Date: - - Wed, 27 Jan 2021 23:56:55 GMT + - Thu, 28 Jan 2021 18:20:40 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -67,13 +67,13 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Wed, 27 Jan 2021 23:56:56 GMT + - Thu, 28 Jan 2021 18:20:39 GMT ms-cv: - - sVJZF/hnPUiFLBDEQt3jnQ.0 + - qp5wpCjFTUmT7TUUWOESmA.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 777ms + - 608ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user_from_managed_identity.yaml index ed23307fa951..4b731c27a912 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user_from_managed_identity.yaml @@ -18,22 +18,22 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:f050eca7-6baa-4427-966b-21841aa36a78_00000007-e62a-1f3f-8337-3b3a0d009555"}}' + string: '{"identity": {"id": "8:acs:d09cd7e3-a33e-4e7b-9ab0-0edc3b9c7ae5_00000007-ea1c-84ff-6032-3b3a0d0002c6"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 23:58:10 GMT + - Thu, 28 Jan 2021 18:21:48 GMT ms-cv: - - RivzvSMrYUCxdpIjJOqXeA.0 + - z+d65i45k0Sfvh2myFd7aQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 193ms + - 596ms status: code: 201 message: Created @@ -59,13 +59,13 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Wed, 27 Jan 2021 23:58:12 GMT + - Thu, 28 Jan 2021 18:21:48 GMT ms-cv: - - akcIQiMeskOt/X1QZdhizg.0 + - V0oUwgZPAkO+7Sxm2/717w.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 1936ms + - 680ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_issue_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_issue_token.yaml index dc7bd3bffa92..a9753f49b6e0 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_issue_token.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_issue_token.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 27 Jan 2021 23:59:18 GMT + - Thu, 28 Jan 2021 18:22:56 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -22,22 +22,22 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:8b7cf66e-98a2-4dc9-b44e-902ad4bd2a83_00000007-e62b-2a03-8d33-3b3a0d00aab4"}}' + string: '{"identity": {"id": "8:acs:fa9ae185-9f60-4454-8be7-5757cf514f4b_00000007-ea1d-8d6f-8d33-3b3a0d000285"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 23:59:19 GMT + - Thu, 28 Jan 2021 18:22:55 GMT ms-cv: - - svjbdAEx+0CIrvFNZfZTNA.0 + - FsWGFnXtdEyCvzh35+CEqw.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 20ms + - 18ms status: code: 201 message: Created @@ -55,7 +55,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 27 Jan 2021 23:59:19 GMT + - Thu, 28 Jan 2021 18:22:57 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -64,22 +64,22 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: body: - string: '{"token": "sanitized", "expiresOn": "2021-01-28T23:59:19.164577+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-01-29T18:22:55.4643038+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Wed, 27 Jan 2021 23:59:20 GMT + - Thu, 28 Jan 2021 18:22:56 GMT ms-cv: - - q/mt/g2JeUiXEsC0OhWXNQ.0 + - SUXqGX/Z4E6C6zfcxiWQEw.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 284ms + - 35ms status: code: 200 message: OK diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_issue_token_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_issue_token_from_managed_identity.yaml index cbcb125440c8..158299657f8b 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_issue_token_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_issue_token_from_managed_identity.yaml @@ -18,22 +18,22 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:31fd4348-e9dd-4222-ae65-a61c9953759c_00000007-e62c-414b-0e04-343a0d00a745"}}' + string: '{"identity": {"id": "8:acs:24c5bf6f-a229-4275-b6a9-cae0d1f70ca4_00000007-ea1e-96a8-6032-3b3a0d0002d2"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Thu, 28 Jan 2021 00:00:30 GMT + - Thu, 28 Jan 2021 18:24:04 GMT ms-cv: - - BndpwMRlKkSHkEuCPG7OOw.0 + - LHLZRP95jE2SbM8pXoqtnA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 198ms + - 501ms status: code: 201 message: Created @@ -56,22 +56,22 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: body: - string: '{"token": "sanitized", "expiresOn": "2021-01-29T00:00:30.7153587+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-01-29T18:24:03.353153+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Thu, 28 Jan 2021 00:00:31 GMT + - Thu, 28 Jan 2021 18:24:04 GMT ms-cv: - - Ka0JSro0U0mjBhf0UNLzSg.0 + - ypXqr3+DHEyTO0p32UznqA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 328ms + - 25ms status: code: 200 message: OK diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens.yaml index ecc9db7c4710..a28fd608b13b 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 28 Jan 2021 00:01:37 GMT + - Thu, 28 Jan 2021 18:25:11 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -22,22 +22,22 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:a83346e4-c8aa-4a33-8993-ef56f44076ba_00000007-e62d-4910-1000-343a0d00b028"}}' + string: '{"identity": {"id": "8:acs:a20c09dd-f2bd-436a-963e-b3ebe238a776_00000007-ea1f-9c81-6a0b-343a0d000336"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Thu, 28 Jan 2021 00:01:38 GMT + - Thu, 28 Jan 2021 18:25:10 GMT ms-cv: - - 3EE+zJXF4kyYK65z0u5AnQ.0 + - PxXsCp3ewkiV+kuaK3GuIQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 18ms + - 17ms status: code: 201 message: Created @@ -55,7 +55,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 28 Jan 2021 00:01:38 GMT + - Thu, 28 Jan 2021 18:25:12 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -64,22 +64,22 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: body: - string: '{"token": "sanitized", "expiresOn": "2021-01-29T00:01:38.1765422+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-01-29T18:25:10.3928345+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Thu, 28 Jan 2021 00:01:39 GMT + - Thu, 28 Jan 2021 18:25:10 GMT ms-cv: - - wkhlq8Sb0ES4lAV8LpBBpw.0 + - 6ws9gzTGzE29EqFje03S+A.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 277ms + - 26ms status: code: 200 message: OK @@ -95,7 +95,7 @@ interactions: Content-Length: - '0' Date: - - Thu, 28 Jan 2021 00:01:38 GMT + - Thu, 28 Jan 2021 18:25:12 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -109,13 +109,13 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Thu, 28 Jan 2021 00:01:39 GMT + - Thu, 28 Jan 2021 18:25:11 GMT ms-cv: - - 3+8Tl9kzVUSYp1fxZqKkSA.0 + - eplI2EHjv0iUNXFu87qwMA.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 231ms + - 319ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens_from_managed_identity.yaml index 25b2208d7edd..73889747b069 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens_from_managed_identity.yaml @@ -18,22 +18,22 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:ae743ca9-44ad-417b-9f52-cd0f7714f7f8_00000007-e62e-559c-defd-8b3a0d0026b9"}}' + string: '{"identity": {"id": "8:acs:bfdef7ee-81ef-49f2-8225-8fc46b6375ca_00000007-ea20-a5c5-0338-3b3a0d000348"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Thu, 28 Jan 2021 00:02:47 GMT + - Thu, 28 Jan 2021 18:26:18 GMT ms-cv: - - 6bho3IvVN0KiuXQIQuaY4A.0 + - aWfeg9AErUumovuCa1Pbag.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 351ms + - 238ms status: code: 201 message: Created @@ -56,22 +56,22 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: body: - string: '{"token": "sanitized", "expiresOn": "2021-01-29T00:02:46.9228559+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-01-29T18:26:18.2983032+00:00"}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 content-type: - application/json; charset=utf-8 date: - - Thu, 28 Jan 2021 00:02:47 GMT + - Thu, 28 Jan 2021 18:26:18 GMT ms-cv: - - IaJHFvPdF0mpl2c2JVYIzw.0 + - lBqqia0r6EisjeNjafRDVA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-processing-time: - - 419ms + - 27ms status: code: 200 message: OK @@ -97,13 +97,13 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-03-07 date: - - Thu, 28 Jan 2021 00:02:48 GMT + - Thu, 28 Jan 2021 18:26:18 GMT ms-cv: - - sw69Gh9HzkGQWmbSHeePvQ.0 + - LqICD2AsY0GGMPyhrc+3rQ.0 strict-transport-security: - max-age=2592000 x-processing-time: - - 800ms + - 311ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user.yaml index 139f7f12432c..55bb7a7540b4 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user.yaml @@ -9,7 +9,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 28 Jan 2021 02:37:42 GMT + - Thu, 28 Jan 2021 18:27:26 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -18,17 +18,17 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:b26ded3d-1e55-4f3b-a385-436c531c2ece_00000007-e6bc-2911-1000-343a0d00b337"}}' + string: '{"identity": {"id": "8:acs:3ede5310-9f4e-4fe7-982b-a7b0fb6f62ba_00000007-ea21-ab82-1000-343a0d0001d8"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:37:41 GMT - ms-cv: EOvcrjAKBEGHLHyBq048NQ.0 + date: Thu, 28 Jan 2021 18:27:25 GMT + ms-cv: R9R7+Dsq50GAvXDxmJUx0A.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 25ms + x-processing-time: 22ms status: code: 201 message: Created - url: https://communicatione75kkmrswqq.communication.azure.com/identities?api-version=2021-03-07 + url: https://communicationcwqafyvgfnt.communication.azure.com/identities?api-version=2021-03-07 version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_from_managed_identity.yaml index ac79afc6d8f2..92101d512f1f 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_from_managed_identity.yaml @@ -14,17 +14,17 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:e299af87-181d-45e4-b67a-5e772b4b24c8_00000007-e6bd-3058-6032-3b3a0d00a17a"}}' + string: '{"identity": {"id": "8:acs:637e59a0-ce59-45d7-b7f5-d169a1592f33_00000007-ea22-b142-6032-3b3a0d0002f0"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:38:48 GMT - ms-cv: aosQ11GFPUalOBpSD0lBaQ.0 + date: Thu, 28 Jan 2021 18:28:33 GMT + ms-cv: 9WNCoxWz4Ei8Qgy2v1O8Vw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 270ms + x-processing-time: 255ms status: code: 201 message: Created - url: https://communicationuyvxmlpqfcw.communication.azure.com/identities?api-version=2021-03-07 + url: https://communicationl7hupoln2fs.communication.azure.com/identities?api-version=2021-03-07 version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_with_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_with_token.yaml index e86dd1e6371e..c2b01b1a85c1 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_with_token.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_with_token.yaml @@ -9,7 +9,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 28 Jan 2021 02:39:55 GMT + - Thu, 28 Jan 2021 18:29:40 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -18,19 +18,19 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:99832228-19ea-4e32-b724-74bf72f8915d_00000007-e6be-3378-8d33-3b3a0d00ad91"}, - "accessToken": {"token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwMiIsIng1dCI6IjNNSnZRYzhrWVNLd1hqbEIySmx6NTRQVzNBYyIsInR5cCI6IkpXVCJ9.eyJza3lwZWlkIjoiYWNzOjk5ODMyMjI4LTE5ZWEtNGUzMi1iNzI0LTc0YmY3MmY4OTE1ZF8wMDAwMDAwNy1lNmJlLTMzNzgtOGQzMy0zYjNhMGQwMGFkOTEiLCJzY3AiOjE3OTIsImNzaSI6IjE2MTE4MDE1OTUiLCJpYXQiOjE2MTE4MDE1OTUsImV4cCI6MTYxMTg4Nzk5NSwiYWNzU2NvcGUiOiJjaGF0IiwicmVzb3VyY2VJZCI6Ijk5ODMyMjI4LTE5ZWEtNGUzMi1iNzI0LTc0YmY3MmY4OTE1ZCJ9.LF5tFDfLceBBoomQtaYhbPZTEBq7fEq5ucN0k_Fd4gUefz2I-y6dBBBOnpy4KEsNHWPHv58fgqWacbC43GnG4o2d7PNiL1g8zNBqibEiBjPEHSuSrlxAASkL5ZBCQWPb0EPfnTeMS0ab4V586MTWv9SfASYIEzsPLwXv8vXwnqnNjHYRAXUeiUabGiAmn8UH4WGJ56YCIL4PoJMLtcSqEo1FL-BmYupSoAZ-ylRtnsrprkIiJGhfQqL2546idq9jgI7Ofq9urYjOitxY6Yaf4EDcNhH4Iklvivo87LtIdZYl0AF-k9K-Tjzdwx6geTe7eSyrYXQhgyr8E0k9azsjuw", - "expiresOn": "2021-01-29T02:39:54.7876798+00:00"}}' + string: '{"identity": {"id": "8:acs:275fda91-acbc-4053-87eb-d90a6627bb7f_00000007-ea23-b751-0e04-343a0d00046e"}, + "accessToken": {"token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjEwMiIsIng1dCI6IjNNSnZRYzhrWVNLd1hqbEIySmx6NTRQVzNBYyIsInR5cCI6IkpXVCJ9.eyJza3lwZWlkIjoiYWNzOjI3NWZkYTkxLWFjYmMtNDA1My04N2ViLWQ5MGE2NjI3YmI3Zl8wMDAwMDAwNy1lYTIzLWI3NTEtMGUwNC0zNDNhMGQwMDA0NmUiLCJzY3AiOjE3OTIsImNzaSI6IjE2MTE4NTg1ODAiLCJpYXQiOjE2MTE4NTg1ODAsImV4cCI6MTYxMTk0NDk4MCwiYWNzU2NvcGUiOiJjaGF0IiwicmVzb3VyY2VJZCI6IjI3NWZkYTkxLWFjYmMtNDA1My04N2ViLWQ5MGE2NjI3YmI3ZiJ9.xtEnhgYK_-RhY4YacvuzfM81uUsq5ngxYOe4E0PA6_OcE76Pjyxa1NtrEXthHq5QR6oh_SP6ZPUe-3Xtt6L9oPsNZ83W7mu1t6Z5BsyTmVL9AvLoq8Eneqqi7cyiLVs56jQNt5EmiBMj4eMO7TD9Ul6dtzGi7qyiaUHKU6wkidvO6Iuupa25VySvOeczVz3rwFlsbrdDZ0FrQRuH8eiLsAENKazVCg9ytIHAKNjA2CXE455Oe-HgDxMpkUPPQ17mNCqZezRAa8QRcxI7w8liUYrwuqHx3qnCPCOgsDJRJPRMWrGGYqh9YhLKhRBzf-FrXJP4VhqzpbD70oL-nUHA0g", + "expiresOn": "2021-01-29T18:29:39.3281007+00:00"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:39:55 GMT - ms-cv: LoHYen34pUWYkMsutT922Q.0 + date: Thu, 28 Jan 2021 18:29:40 GMT + ms-cv: yRgYDUL3/0+AOZKs1+jS/A.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 32ms + x-processing-time: 33ms status: code: 201 message: Created - url: https://communicationaq6igkh2usb.communication.azure.com/identities?api-version=2021-03-07 + url: https://communicationulfz3xudlmd.communication.azure.com/identities?api-version=2021-03-07 version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user.yaml index e1b138834aaa..c3ca3d34f503 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user.yaml @@ -9,7 +9,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 28 Jan 2021 02:41:01 GMT + - Thu, 28 Jan 2021 18:30:47 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -18,26 +18,26 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:d483da20-3812-4e70-b5a8-481118650acd_00000007-e6bf-355e-1000-343a0d00b33d"}}' + string: '{"identity": {"id": "8:acs:97bf4384-afa2-4105-ab2d-3942c5d79e07_00000007-ea24-bc23-6a0b-343a0d000341"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:41:01 GMT - ms-cv: 8vQZTcgPHk+qWq1ms36ScA.0 + date: Thu, 28 Jan 2021 18:30:46 GMT + ms-cv: ZnaGd7AZqUON3i87x5/9Sw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 19ms + x-processing-time: 18ms status: code: 201 message: Created - url: https://communicationb4ch4hbfoan.communication.azure.com/identities?api-version=2021-03-07 + url: https://communicationcyfpwb3b4yv.communication.azure.com/identities?api-version=2021-03-07 - request: body: '' headers: Accept: - application/json Date: - - Thu, 28 Jan 2021 02:41:02 GMT + - Thu, 28 Jan 2021 18:30:47 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -49,12 +49,12 @@ interactions: string: '' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 - date: Thu, 28 Jan 2021 02:41:02 GMT - ms-cv: id2Rhv3ZBkKfkmTsqROVPQ.0 + date: Thu, 28 Jan 2021 18:30:47 GMT + ms-cv: 2r/a5FNHbU+LN0MggdBs5w.0 strict-transport-security: max-age=2592000 - x-processing-time: 580ms + x-processing-time: 588ms status: code: 204 message: No Content - url: https://communicationb4ch4hbfoan.communication.azure.com/identities/sanitized?api-version=2021-03-07 + url: https://communicationcyfpwb3b4yv.communication.azure.com/identities/sanitized?api-version=2021-03-07 version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user_from_managed_identity.yaml index 8695e93670cf..dc048da0cf33 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user_from_managed_identity.yaml @@ -14,19 +14,19 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:21946a88-df62-4947-a439-d8b428fae608_00000007-e6c0-3df4-f40f-343a0d00aff5"}}' + string: '{"identity": {"id": "8:acs:c749c3f7-6fb8-434a-8ef0-ccc5f6a198e5_00000007-ea25-c67c-4332-3b3a0d000294"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:42:09 GMT - ms-cv: /fcPJQMQ20Ckyz/ndEd+Rw.0 + date: Thu, 28 Jan 2021 18:31:54 GMT + ms-cv: vbel3S3GxESgmqgR8D11Lw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 242ms + x-processing-time: 180ms status: code: 201 message: Created - url: https://communicationcaxbvn4unsg.communication.azure.com/identities?api-version=2021-03-07 + url: https://communicationtneeon45jhx.communication.azure.com/identities?api-version=2021-03-07 - request: body: null headers: @@ -41,12 +41,12 @@ interactions: string: '' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 - date: Thu, 28 Jan 2021 02:42:09 GMT - ms-cv: bUHUZC1XVUy/+nGizjl8Pg.0 + date: Thu, 28 Jan 2021 18:31:54 GMT + ms-cv: 2dUpF+vrF0Gfachfgw0OaQ.0 strict-transport-security: max-age=2592000 - x-processing-time: 323ms + x-processing-time: 401ms status: code: 204 message: No Content - url: https://communicationcaxbvn4unsg.communication.azure.com/identities/sanitized?api-version=2021-03-07 + url: https://communicationtneeon45jhx.communication.azure.com/identities/sanitized?api-version=2021-03-07 version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_issue_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_issue_token.yaml index 5bd47ef72ee1..fe26f4e28031 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_issue_token.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_issue_token.yaml @@ -9,7 +9,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 28 Jan 2021 02:43:15 GMT + - Thu, 28 Jan 2021 18:33:02 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -18,19 +18,19 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:a050fdf2-1875-40a3-823c-bfbab6e9549a_00000007-e6c1-4135-8337-3b3a0d009895"}}' + string: '{"identity": {"id": "8:acs:21fb9d58-5d22-412c-b382-4d00a17a9e82_00000007-ea26-ca65-f40f-343a0d0001b6"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:43:15 GMT - ms-cv: kpIV1sFQ9ECo1Mdri/yfHg.0 + date: Thu, 28 Jan 2021 18:33:01 GMT + ms-cv: GT6Oe3Sa+ESINExEesALCw.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 20ms + x-processing-time: 22ms status: code: 201 message: Created - url: https://communication7op72yysraa.communication.azure.com/identities?api-version=2021-03-07 + url: https://communicationohk2wgjgjym.communication.azure.com/identities?api-version=2021-03-07 - request: body: '{"scopes": ["chat"]}' headers: @@ -41,7 +41,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 28 Jan 2021 02:43:16 GMT + - Thu, 28 Jan 2021 18:33:02 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -50,17 +50,17 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: body: - string: '{"token": "sanitized", "expiresOn": "2021-01-29T02:43:15.0315352+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-01-29T18:33:00.8904527+00:00"}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:43:15 GMT - ms-cv: A9azmXm8skCQ+ybgBNHhMA.0 + date: Thu, 28 Jan 2021 18:33:01 GMT + ms-cv: tyqmpTNhZEyFRVHGw5SZFQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 25ms + x-processing-time: 37ms status: code: 200 message: OK - url: https://communication7op72yysraa.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + url: https://communicationohk2wgjgjym.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_issue_token_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_issue_token_from_managed_identity.yaml index e9e89dd16499..c15337fc3089 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_issue_token_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_issue_token_from_managed_identity.yaml @@ -14,19 +14,19 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:49762d30-5d67-4622-ac01-27cb3584ad03_00000007-e6c2-463e-ac00-343a0d00b53c"}}' + string: '{"identity": {"id": "8:acs:d6a9fb3a-b511-4b40-9304-22c13099749e_00000007-ea27-d1c4-6032-3b3a0d000301"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:44:22 GMT - ms-cv: PPDv4eDlWUWv2Y+FPaXGTQ.0 + date: Thu, 28 Jan 2021 18:34:08 GMT + ms-cv: CtZqgYJkY0qbAU8jiu8TFA.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 182ms + x-processing-time: 154ms status: code: 201 message: Created - url: https://communicationjs2pwd3y75r.communication.azure.com/identities?api-version=2021-03-07 + url: https://communicationg6gd4r45ekt.communication.azure.com/identities?api-version=2021-03-07 - request: body: '{"scopes": ["chat"]}' headers: @@ -42,17 +42,17 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: body: - string: '{"token": "sanitized", "expiresOn": "2021-01-29T02:44:21.797763+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-01-29T18:34:08.3116+00:00"}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:44:22 GMT - ms-cv: hYJN857TTUGIzI7tvY89Lw.0 + date: Thu, 28 Jan 2021 18:34:08 GMT + ms-cv: ZA/7bP/Ko0qYFcPqqVMgFQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 27ms + x-processing-time: 25ms status: code: 200 message: OK - url: https://communicationjs2pwd3y75r.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + url: https://communicationg6gd4r45ekt.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens.yaml index b5cc15b85eb4..701ba60e03d3 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens.yaml @@ -9,7 +9,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 28 Jan 2021 02:45:28 GMT + - Thu, 28 Jan 2021 18:35:16 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -18,19 +18,19 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:4156c432-c095-4b67-9525-d0d970eed49f_00000007-e6c3-4711-0e04-343a0d00ab64"}}' + string: '{"identity": {"id": "8:acs:d5fbb74a-0771-410d-aaba-68e062944ee8_00000007-ea28-d4d2-0e04-343a0d000479"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:45:28 GMT - ms-cv: El3EPvivOEKWtT1GNRWobw.0 + date: Thu, 28 Jan 2021 18:35:15 GMT + ms-cv: LsSG8RkXGUiTvgGH8Q2iUA.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 19ms + x-processing-time: 21ms status: code: 201 message: Created - url: https://communicationtwgk7xf3f7w.communication.azure.com/identities?api-version=2021-03-07 + url: https://communicationhqyejrwmxtt.communication.azure.com/identities?api-version=2021-03-07 - request: body: '{"scopes": ["chat"]}' headers: @@ -41,7 +41,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 28 Jan 2021 02:45:28 GMT + - Thu, 28 Jan 2021 18:35:16 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -50,26 +50,26 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: body: - string: '{"token": "sanitized", "expiresOn": "2021-01-29T02:45:27.5480368+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-01-29T18:35:14.6227077+00:00"}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:45:28 GMT - ms-cv: sklndbfiO0uDkBZD1TiYfA.0 + date: Thu, 28 Jan 2021 18:35:15 GMT + ms-cv: tTstxEs8oUGTrI0GV3R0LQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 29ms + x-processing-time: 26ms status: code: 200 message: OK - url: https://communicationtwgk7xf3f7w.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + url: https://communicationhqyejrwmxtt.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 - request: body: '' headers: Accept: - application/json Date: - - Thu, 28 Jan 2021 02:45:28 GMT + - Thu, 28 Jan 2021 18:35:16 GMT User-Agent: - azsdk-python-communication-identity/1.0.0b4 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-return-client-request-id: @@ -81,12 +81,12 @@ interactions: string: '' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 - date: Thu, 28 Jan 2021 02:45:29 GMT - ms-cv: 1IEIWclZGk6XTjA3bjiwgw.0 + date: Thu, 28 Jan 2021 18:35:15 GMT + ms-cv: Qq4ZFU9ZpUuClG9fuspq1Q.0 strict-transport-security: max-age=2592000 - x-processing-time: 628ms + x-processing-time: 311ms status: code: 204 message: No Content - url: https://communicationtwgk7xf3f7w.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-03-07 + url: https://communicationhqyejrwmxtt.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-03-07 version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens_from_managed_identity.yaml index aa82a6b49dc7..836dfd2cb547 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens_from_managed_identity.yaml @@ -14,19 +14,19 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities?api-version=2021-03-07 response: body: - string: '{"identity": {"id": "8:acs:f1c4becd-73c5-45f2-9597-4ec8cd3a1ab9_00000007-e6c4-4fbb-6032-3b3a0d00a18c"}}' + string: '{"identity": {"id": "8:acs:9c243817-dfbe-432e-b72f-f85ef3b2f4eb_00000007-ea29-dd81-0338-3b3a0d000388"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:46:35 GMT - ms-cv: CYpZ2LF4wEaD5kO1JjvXVw.0 + date: Thu, 28 Jan 2021 18:36:22 GMT + ms-cv: xJV0TRqg1EOgI5OdRmuqow.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked - x-processing-time: 203ms + x-processing-time: 227ms status: code: 201 message: Created - url: https://communicationyhjerbqgmdh.communication.azure.com/identities?api-version=2021-03-07 + url: https://communicationzgjjmgzzjny.communication.azure.com/identities?api-version=2021-03-07 - request: body: '{"scopes": ["chat"]}' headers: @@ -42,19 +42,19 @@ interactions: uri: https://communicationegrcrs.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 response: body: - string: '{"token": "sanitized", "expiresOn": "2021-01-29T02:46:35.2885265+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-01-29T18:36:22.3834487+00:00"}' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 content-type: application/json; charset=utf-8 - date: Thu, 28 Jan 2021 02:46:35 GMT - ms-cv: uF35+QvQnE20Wjd65apo0A.0 + date: Thu, 28 Jan 2021 18:36:23 GMT + ms-cv: B3CeQ2BKKU6Noqw+KqX+HQ.0 strict-transport-security: max-age=2592000 transfer-encoding: chunked x-processing-time: 24ms status: code: 200 message: OK - url: https://communicationyhjerbqgmdh.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + url: https://communicationzgjjmgzzjny.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 - request: body: null headers: @@ -69,12 +69,12 @@ interactions: string: '' headers: api-supported-versions: 2020-07-20-preview2, 2021-03-07 - date: Thu, 28 Jan 2021 02:46:35 GMT - ms-cv: T6cWVDrvuEWzmNW+5XJ8AA.0 + date: Thu, 28 Jan 2021 18:36:23 GMT + ms-cv: P7MHamf7XE6e1/GYbRD19g.0 strict-transport-security: max-age=2592000 - x-processing-time: 192ms + x-processing-time: 88ms status: code: 204 message: No Content - url: https://communicationyhjerbqgmdh.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-03-07 + url: https://communicationzgjjmgzzjny.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-03-07 version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/test_communication_identity_client.py b/sdk/communication/azure-communication-identity/tests/test_communication_identity_client.py index 9fc58152be3c..ad8466c3eb70 100644 --- a/sdk/communication/azure-communication-identity/tests/test_communication_identity_client.py +++ b/sdk/communication/azure-communication-identity/tests/test_communication_identity_client.py @@ -6,6 +6,7 @@ # -------------------------------------------------------------------------- import pytest from azure.communication.identity import CommunicationIdentityClient +from azure.communication.identity import CommunicationTokenScope from azure.core.credentials import AccessToken from _shared.helper import URIIdentityReplacer from _shared.testcase import ( @@ -53,6 +54,15 @@ def test_create_user(self, connection_string): assert user.identifier is not None + @ResourceGroupPreparer(random_name_enabled=True) + @CommunicationServicePreparer() + async def test_create_user_with_token(self, connection_string): + identity_client = CommunicationIdentityClient.from_connection_string(connection_string) + user, token_response = identity_client.create_user_with_token(scopes=[CommunicationTokenScope.CHAT]) + + assert user.identifier is not None + assert token_response.token is not None + @ResourceGroupPreparer(random_name_enabled=True) @CommunicationServicePreparer() def test_issue_token_from_managed_identity(self, connection_string): @@ -65,7 +75,7 @@ def test_issue_token_from_managed_identity(self, connection_string): identity_client = CommunicationIdentityClient(endpoint, credential) user = identity_client.create_user() - token_response = identity_client.issue_token(user, scopes=["chat"]) + token_response = identity_client.issue_token(user, scopes=[CommunicationTokenScope.CHAT]) assert user.identifier is not None assert token_response.token is not None @@ -77,7 +87,7 @@ def test_issue_token(self, connection_string): connection_string) user = identity_client.create_user() - token_response = identity_client.issue_token(user, scopes=["chat"]) + token_response = identity_client.issue_token(user, scopes=[CommunicationTokenScope.CHAT]) assert user.identifier is not None assert token_response.token is not None @@ -94,7 +104,7 @@ def test_revoke_tokens_from_managed_identity(self, connection_string): identity_client = CommunicationIdentityClient(endpoint, credential) user = identity_client.create_user() - token_response = identity_client.issue_token(user, scopes=["chat"]) + token_response = identity_client.issue_token(user, scopes=[CommunicationTokenScope.CHAT]) identity_client.revoke_tokens(user) assert user.identifier is not None @@ -107,7 +117,7 @@ def test_revoke_tokens(self, connection_string): connection_string) user = identity_client.create_user() - token_response = identity_client.issue_token(user, scopes=["chat"]) + token_response = identity_client.issue_token(user, scopes=[CommunicationTokenScope.CHAT]) identity_client.revoke_tokens(user) assert user.identifier is not None