diff --git a/sdk/communication/communication-administration/recordings/browsers/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.json b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.json index 21e3baaf8d1a..7f5b027a9b6c 100644 --- a/sdk/communication/communication-administration/recordings/browsers/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.json +++ b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.json @@ -1,35 +1,35 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2020-07-20-preview2" - }, - "requestBody": null, - "status": 200, - "response": "{\"id\":\"sanitized\"}", - "responseHeaders": { - "content-type": "application/json; charset=utf-8" - } + "recordings": [ + { + "method": "POST", + "url": "https://endpoint/identities", + "query": { + "api-version": "2020-07-20-preview2" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"sanitized\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "POST", + "url": "https://endpoint/identities/sanitized/token", + "query": { + "api-version": "2020-07-20-preview2" + }, + "requestBody": "{\"scopes\":[\"chat\",\"pstn\"]}", + "status": 200, + "response": "{\"id\":\"sanitized\",\"token\":\"sanitized\",\"expiresOn\":\"2021-01-09T00:30:24.5035871+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} }, - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/token", - "query": { - "api-version": "2020-07-20-preview2" - }, - "requestBody": "{\"scopes\":[\"chat\",\"pstn\"]}", - "status": 200, - "response": "{\"id\":\"sanitized\",\"token\":\"sanitized\",\"expiresOn\":\"2021-01-09T00:30:24.5035871+00:00\"}", - "responseHeaders": { - "content-type": "application/json; charset=utf-8" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "9b1612c756e3b1947bf920b9c1547a11" -} \ No newline at end of file + "hash": "9b1612c756e3b1947bf920b9c1547a11" +} diff --git a/sdk/communication/communication-administration/recordings/browsers/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.json b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.json index 00cb67c2615c..f09e712e8d8f 100644 --- a/sdk/communication/communication-administration/recordings/browsers/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.json +++ b/sdk/communication/communication-administration/recordings/browsers/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.json @@ -1,35 +1,35 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2020-07-20-preview2" - }, - "requestBody": null, - "status": 200, - "response": "{\"id\":\"sanitized\"}", - "responseHeaders": { - "content-type": "application/json; charset=utf-8" - } + "recordings": [ + { + "method": "POST", + "url": "https://endpoint/identities", + "query": { + "api-version": "2020-07-20-preview2" + }, + "requestBody": null, + "status": 200, + "response": "{\"id\":\"sanitized\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + }, + { + "method": "POST", + "url": "https://endpoint/identities/sanitized/token", + "query": { + "api-version": "2020-07-20-preview2" + }, + "requestBody": "{\"scopes\":[\"chat\"]}", + "status": 200, + "response": "{\"id\":\"sanitized\",\"token\":\"sanitized\",\"expiresOn\":\"2021-01-09T00:30:23.8797553+00:00\"}", + "responseHeaders": { + "content-type": "application/json; charset=utf-8" + } + } + ], + "uniqueTestInfo": { + "uniqueName": {}, + "newDate": {} }, - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/token", - "query": { - "api-version": "2020-07-20-preview2" - }, - "requestBody": "{\"scopes\":[\"chat\"]}", - "status": 200, - "response": "{\"id\":\"sanitized\",\"token\":\"sanitized\",\"expiresOn\":\"2021-01-09T00:30:23.8797553+00:00\"}", - "responseHeaders": { - "content-type": "application/json; charset=utf-8" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "40526ad80f09a28d7742f58e3ad17e7f" -} \ No newline at end of file + "hash": "40526ad80f09a28d7742f58e3ad17e7f" +} diff --git a/sdk/communication/communication-administration/recordings/node/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.js b/sdk/communication/communication-administration/recordings/node/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.js index 4f24d66cb486..a7ff7bffc95d 100644 --- a/sdk/communication/communication-administration/recordings/node/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.js +++ b/sdk/communication/communication-administration/recordings/node/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_multiple_scopes.js @@ -1,87 +1,104 @@ -let nock = require('nock'); +let nock = require("nock"); module.exports.hash = "0441531d19c5ab9860067f15f510ddc1"; -module.exports.testInfo = {"uniqueName":{},"newDate":{}} +module.exports.testInfo = { uniqueName: {}, newDate: {} }; -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=SomeClientSecret&scope=https%3A%2F%2Fcommunication.azure.com%2F%2F.default") +nock("https://endpoint", { encodedQueryParams: true }) + .post( + "/SomeTenantId/oauth2/v2.0/token", + "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=SomeClientSecret&scope=https%3A%2F%2Fcommunication.azure.com%2F%2F.default" + ) .query(true) - .reply(200, {"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjVPZjlQNUY5Z0NDd0NtRjJCT0hIeEREUS1EayIsImtpZCI6IjVPZjlQNUY5Z0NDd0NtRjJCT0hIeEREUS1EayJ9.eyJhdWQiOiJodHRwczovL2NvbW11bmljYXRpb24uYXp1cmUuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0L2IzYmYwOTZlLWNlMTItNGRhZC05MjAzLWVkNzBhOGIwOTljMS8iLCJpYXQiOjE2MDg1ODIxOTQsIm5iZiI6MTYwODU4MjE5NCwiZXhwIjoxNjA4NTg2MDk0LCJhaW8iOiJFMkpnWVBnYndsVmlISHczZU52aEp1NkhGMVQwQUE9PSIsImFwcGlkIjoiZjM3MzQyMGUtMTFiZC00NzRiLTk4MjItOWYzMTU1MzNhZjQzIiwiYXBwaWRhY3IiOiIxIiwiaWRwIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvYjNiZjA5NmUtY2UxMi00ZGFkLTkyMDMtZWQ3MGE4YjA5OWMxLyIsIm9pZCI6IjdkNmFjZWIyLTYyNDgtNGFiNC1hYTMzLWRhMjU1ODEwZGVhYyIsInJoIjoiMC5BQUFBYmdtX3N4TE9yVTJTQS0xd3FMQ1p3UTVDY19POUVVdEhtQ0tmTVZVenIwTjJBQUEuIiwic3ViIjoiN2Q2YWNlYjItNjI0OC00YWI0LWFhMzMtZGEyNTU4MTBkZWFjIiwidGlkIjoiYjNiZjA5NmUtY2UxMi00ZGFkLTkyMDMtZWQ3MGE4YjA5OWMxIiwidXRpIjoiS3EtamlkOGxOVUdkMk1nNDJiUVlBQSIsInZlciI6IjEuMCJ9.t_LoTlE2eoayhdRCE8MxAAybmIzGlCuAzuVI9raLyfv5Sq8nk8_5JvP20wR4QcxZKGx1xaiRmS63vKuh8iJy4CPDxbQ2DQYeQ7G6po-XsF8_pUKNLwUTs9QrwpCMb1847jkCf5vKci_iAg8IuK1-79Dz_LR1OWglNgTWexzqTbVTsx-HBzq_Lpf7UvxadBEh9k7AXtgESEUkO3fakxEvJO5BWXvVEGGNGug-Q5YCP5dHzQFjtDhtDcbwVMllAZU2FwfbQ7n0YVg4oIwo8Lj3BUhiIN897KZiLxFG_UaoYp5-FEJy7BKCJoiONkKCipZR--6CRYERuZ3cxuum69rJvQ"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'sanitized', - 'x-ms-ests-server', - '2.1.11328.13 - EST ProdSlices', - 'Set-Cookie', - 'fpc=ArfpERbVoHRBizrQ1sfKyGX3ZxdeAQAAAF38ctcOAAAA; expires=Wed, 20-Jan-2021 20:28:14 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=prod; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=ests; path=/; secure; samesite=none; httponly', - 'Date', - 'Mon, 21 Dec 2020 20:28:13 GMT', - 'Content-Length', - '1325' -]); + .reply( + 200, + { + token_type: "Bearer", + expires_in: 3599, + ext_expires_in: 3599, + access_token: + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjVPZjlQNUY5Z0NDd0NtRjJCT0hIeEREUS1EayIsImtpZCI6IjVPZjlQNUY5Z0NDd0NtRjJCT0hIeEREUS1EayJ9.eyJhdWQiOiJodHRwczovL2NvbW11bmljYXRpb24uYXp1cmUuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0L2IzYmYwOTZlLWNlMTItNGRhZC05MjAzLWVkNzBhOGIwOTljMS8iLCJpYXQiOjE2MDg1ODIxOTQsIm5iZiI6MTYwODU4MjE5NCwiZXhwIjoxNjA4NTg2MDk0LCJhaW8iOiJFMkpnWVBnYndsVmlISHczZU52aEp1NkhGMVQwQUE9PSIsImFwcGlkIjoiZjM3MzQyMGUtMTFiZC00NzRiLTk4MjItOWYzMTU1MzNhZjQzIiwiYXBwaWRhY3IiOiIxIiwiaWRwIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvYjNiZjA5NmUtY2UxMi00ZGFkLTkyMDMtZWQ3MGE4YjA5OWMxLyIsIm9pZCI6IjdkNmFjZWIyLTYyNDgtNGFiNC1hYTMzLWRhMjU1ODEwZGVhYyIsInJoIjoiMC5BQUFBYmdtX3N4TE9yVTJTQS0xd3FMQ1p3UTVDY19POUVVdEhtQ0tmTVZVenIwTjJBQUEuIiwic3ViIjoiN2Q2YWNlYjItNjI0OC00YWI0LWFhMzMtZGEyNTU4MTBkZWFjIiwidGlkIjoiYjNiZjA5NmUtY2UxMi00ZGFkLTkyMDMtZWQ3MGE4YjA5OWMxIiwidXRpIjoiS3EtamlkOGxOVUdkMk1nNDJiUVlBQSIsInZlciI6IjEuMCJ9.t_LoTlE2eoayhdRCE8MxAAybmIzGlCuAzuVI9raLyfv5Sq8nk8_5JvP20wR4QcxZKGx1xaiRmS63vKuh8iJy4CPDxbQ2DQYeQ7G6po-XsF8_pUKNLwUTs9QrwpCMb1847jkCf5vKci_iAg8IuK1-79Dz_LR1OWglNgTWexzqTbVTsx-HBzq_Lpf7UvxadBEh9k7AXtgESEUkO3fakxEvJO5BWXvVEGGNGug-Q5YCP5dHzQFjtDhtDcbwVMllAZU2FwfbQ7n0YVg4oIwo8Lj3BUhiIN897KZiLxFG_UaoYp5-FEJy7BKCJoiONkKCipZR--6CRYERuZ3cxuum69rJvQ" + }, + [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Content-Type", + "application/json; charset=utf-8", + "Expires", + "-1", + "Strict-Transport-Security", + "max-age=31536000; includeSubDomains", + "X-Content-Type-Options", + "nosniff", + "P3P", + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + "x-ms-request-id", + "sanitized", + "x-ms-ests-server", + "2.1.11328.13 - EST ProdSlices", + "Set-Cookie", + "fpc=ArfpERbVoHRBizrQ1sfKyGX3ZxdeAQAAAF38ctcOAAAA; expires=Wed, 20-Jan-2021 20:28:14 GMT; path=/; secure; HttpOnly; SameSite=None", + "Set-Cookie", + "x-ms-gateway-slice=prod; path=/; secure; samesite=none; httponly", + "Set-Cookie", + "stsservicecookie=ests; path=/; secure; samesite=none; httponly", + "Date", + "Mon, 21 Dec 2020 20:28:13 GMT", + "Content-Length", + "1325" + ] + ); -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities') +nock("https://endpoint", { encodedQueryParams: true }) + .post("/identities") .query(true) - .reply(200, {"id":"sanitized"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'MS-CV', - 'F//8oN+qAU6OCUZfpUCJag.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - 'sanitized', - 'api-supported-versions', - '2020-01-15-preview3, 2020-07-20-preview1, 2020-07-20-preview2', - 'X-Processing-Time', - '357ms', - 'X-Azure-Ref', - '0XgXhXwAAAABec5/iW5l5SblJgIQheeTrRVdSMzBFREdFMDYxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Mon, 21 Dec 2020 20:28:14 GMT' -]); + .reply(200, { id: "sanitized" }, [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "F//8oN+qAU6OCUZfpUCJag.0", + "Strict-Transport-Security", + "max-age=2592000", + "x-ms-client-request-id", + "sanitized", + "api-supported-versions", + "2020-01-15-preview3, 2020-07-20-preview1, 2020-07-20-preview2", + "X-Processing-Time", + "357ms", + "X-Azure-Ref", + "0XgXhXwAAAABec5/iW5l5SblJgIQheeTrRVdSMzBFREdFMDYxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Mon, 21 Dec 2020 20:28:14 GMT" + ]); -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/token', {"scopes":["chat","pstn"]}) +nock("https://endpoint", { encodedQueryParams: true }) + .post("/identities/sanitized/token", { scopes: ["chat", "pstn"] }) .query(true) - .reply(200, {"id":"sanitized","token":"sanitized","expiresOn":"2020-12-22T20:28:14.0876313+00:00"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'MS-CV', - '75/9zD7vCke7F+DMNRP/aA.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - 'sanitized', - 'api-supported-versions', - '2020-01-15-preview3, 2020-07-20-preview1, 2020-07-20-preview2', - 'X-Processing-Time', - '275ms', - 'X-Azure-Ref', - '0XgXhXwAAAAAWDj7kN70PRrsn2GtE6GQMRVdSMzBFREdFMDYxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Mon, 21 Dec 2020 20:28:14 GMT' -]); + .reply( + 200, + { id: "sanitized", token: "sanitized", expiresOn: "2020-12-22T20:28:14.0876313+00:00" }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "75/9zD7vCke7F+DMNRP/aA.0", + "Strict-Transport-Security", + "max-age=2592000", + "x-ms-client-request-id", + "sanitized", + "api-supported-versions", + "2020-01-15-preview3, 2020-07-20-preview1, 2020-07-20-preview2", + "X-Processing-Time", + "275ms", + "X-Azure-Ref", + "0XgXhXwAAAAAWDj7kN70PRrsn2GtE6GQMRVdSMzBFREdFMDYxMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Mon, 21 Dec 2020 20:28:14 GMT" + ] + ); diff --git a/sdk/communication/communication-administration/recordings/node/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.js b/sdk/communication/communication-administration/recordings/node/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.js index fe65dd6e7131..046780fc13e8 100644 --- a/sdk/communication/communication-administration/recordings/node/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.js +++ b/sdk/communication/communication-administration/recordings/node/communicationidentityclientwithtoken_playbacklive/recording_successfully_issues_a_token_for_a_user_single_scope.js @@ -1,87 +1,104 @@ -let nock = require('nock'); +let nock = require("nock"); module.exports.hash = "af7c6cb9bdc93d68a7d9359ea157526a"; -module.exports.testInfo = {"uniqueName":{},"newDate":{}} +module.exports.testInfo = { uniqueName: {}, newDate: {} }; -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=SomeClientSecret&scope=https%3A%2F%2Fcommunication.azure.com%2F%2F.default") +nock("https://endpoint", { encodedQueryParams: true }) + .post( + "/SomeTenantId/oauth2/v2.0/token", + "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=SomeClientSecret&scope=https%3A%2F%2Fcommunication.azure.com%2F%2F.default" + ) .query(true) - .reply(200, {"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjVPZjlQNUY5Z0NDd0NtRjJCT0hIeEREUS1EayIsImtpZCI6IjVPZjlQNUY5Z0NDd0NtRjJCT0hIeEREUS1EayJ9.eyJhdWQiOiJodHRwczovL2NvbW11bmljYXRpb24uYXp1cmUuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0L2IzYmYwOTZlLWNlMTItNGRhZC05MjAzLWVkNzBhOGIwOTljMS8iLCJpYXQiOjE2MDg1ODIxOTIsIm5iZiI6MTYwODU4MjE5MiwiZXhwIjoxNjA4NTg2MDkyLCJhaW8iOiJFMkpnWURqMCsxa1J3NlNhZ2dtT1FzWXNiNjIrQVFBPSIsImFwcGlkIjoiZjM3MzQyMGUtMTFiZC00NzRiLTk4MjItOWYzMTU1MzNhZjQzIiwiYXBwaWRhY3IiOiIxIiwiaWRwIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvYjNiZjA5NmUtY2UxMi00ZGFkLTkyMDMtZWQ3MGE4YjA5OWMxLyIsIm9pZCI6IjdkNmFjZWIyLTYyNDgtNGFiNC1hYTMzLWRhMjU1ODEwZGVhYyIsInJoIjoiMC5BQUFBYmdtX3N4TE9yVTJTQS0xd3FMQ1p3UTVDY19POUVVdEhtQ0tmTVZVenIwTjJBQUEuIiwic3ViIjoiN2Q2YWNlYjItNjI0OC00YWI0LWFhMzMtZGEyNTU4MTBkZWFjIiwidGlkIjoiYjNiZjA5NmUtY2UxMi00ZGFkLTkyMDMtZWQ3MGE4YjA5OWMxIiwidXRpIjoiU21Xc0FLazU0a2kzVm96Tnc2OGNBQSIsInZlciI6IjEuMCJ9.F46MEvo2_VDwBQ0z_u96AM9x4BISmXz-hHasAHGHL0JS2jTX4qT24CkCy0VMNRLFwTMjaXyrUUB8S1cg190Epm5xaCSrLphxhbHu5eUy3H8ZWtkRaTWsdeqzJ16qc7H9S_dWhALFwR7Y47ofKFZrrwUr0RMNAwgSzHzmQYqNfB8aiP184ikQgZ_59RGeaDt7gC2tIrtdhlcMrjs6VnuawvuyZ54-CUR5mT-Ke8Ju72zwQtdzQSxm9v8XmgfdxX5lEwN88zBhyuqXLXTD55ijNrtU-A1YnDA-Vq9RqAfR22fo5F8BRuQ1mN3iyMdQMyrt5WFLwFRJ-s0Y7iL0R0UjlA"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'sanitized', - 'x-ms-ests-server', - '2.1.11328.13 - EST ProdSlices', - 'Set-Cookie', - 'fpc=AtRAjxDA_PNGk8IgAAZklDb3ZxdeAQAAAFz8ctcOAAAA; expires=Wed, 20-Jan-2021 20:28:12 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=prod; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=ests; path=/; secure; samesite=none; httponly', - 'Date', - 'Mon, 21 Dec 2020 20:28:12 GMT', - 'Content-Length', - '1325' -]); + .reply( + 200, + { + token_type: "Bearer", + expires_in: 3599, + ext_expires_in: 3599, + access_token: + "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IjVPZjlQNUY5Z0NDd0NtRjJCT0hIeEREUS1EayIsImtpZCI6IjVPZjlQNUY5Z0NDd0NtRjJCT0hIeEREUS1EayJ9.eyJhdWQiOiJodHRwczovL2NvbW11bmljYXRpb24uYXp1cmUuY29tLyIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0L2IzYmYwOTZlLWNlMTItNGRhZC05MjAzLWVkNzBhOGIwOTljMS8iLCJpYXQiOjE2MDg1ODIxOTIsIm5iZiI6MTYwODU4MjE5MiwiZXhwIjoxNjA4NTg2MDkyLCJhaW8iOiJFMkpnWURqMCsxa1J3NlNhZ2dtT1FzWXNiNjIrQVFBPSIsImFwcGlkIjoiZjM3MzQyMGUtMTFiZC00NzRiLTk4MjItOWYzMTU1MzNhZjQzIiwiYXBwaWRhY3IiOiIxIiwiaWRwIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvYjNiZjA5NmUtY2UxMi00ZGFkLTkyMDMtZWQ3MGE4YjA5OWMxLyIsIm9pZCI6IjdkNmFjZWIyLTYyNDgtNGFiNC1hYTMzLWRhMjU1ODEwZGVhYyIsInJoIjoiMC5BQUFBYmdtX3N4TE9yVTJTQS0xd3FMQ1p3UTVDY19POUVVdEhtQ0tmTVZVenIwTjJBQUEuIiwic3ViIjoiN2Q2YWNlYjItNjI0OC00YWI0LWFhMzMtZGEyNTU4MTBkZWFjIiwidGlkIjoiYjNiZjA5NmUtY2UxMi00ZGFkLTkyMDMtZWQ3MGE4YjA5OWMxIiwidXRpIjoiU21Xc0FLazU0a2kzVm96Tnc2OGNBQSIsInZlciI6IjEuMCJ9.F46MEvo2_VDwBQ0z_u96AM9x4BISmXz-hHasAHGHL0JS2jTX4qT24CkCy0VMNRLFwTMjaXyrUUB8S1cg190Epm5xaCSrLphxhbHu5eUy3H8ZWtkRaTWsdeqzJ16qc7H9S_dWhALFwR7Y47ofKFZrrwUr0RMNAwgSzHzmQYqNfB8aiP184ikQgZ_59RGeaDt7gC2tIrtdhlcMrjs6VnuawvuyZ54-CUR5mT-Ke8Ju72zwQtdzQSxm9v8XmgfdxX5lEwN88zBhyuqXLXTD55ijNrtU-A1YnDA-Vq9RqAfR22fo5F8BRuQ1mN3iyMdQMyrt5WFLwFRJ-s0Y7iL0R0UjlA" + }, + [ + "Cache-Control", + "no-store, no-cache", + "Pragma", + "no-cache", + "Content-Type", + "application/json; charset=utf-8", + "Expires", + "-1", + "Strict-Transport-Security", + "max-age=31536000; includeSubDomains", + "X-Content-Type-Options", + "nosniff", + "P3P", + 'CP="DSP CUR OTPi IND OTRi ONL FIN"', + "x-ms-request-id", + "sanitized", + "x-ms-ests-server", + "2.1.11328.13 - EST ProdSlices", + "Set-Cookie", + "fpc=AtRAjxDA_PNGk8IgAAZklDb3ZxdeAQAAAFz8ctcOAAAA; expires=Wed, 20-Jan-2021 20:28:12 GMT; path=/; secure; HttpOnly; SameSite=None", + "Set-Cookie", + "x-ms-gateway-slice=prod; path=/; secure; samesite=none; httponly", + "Set-Cookie", + "stsservicecookie=ests; path=/; secure; samesite=none; httponly", + "Date", + "Mon, 21 Dec 2020 20:28:12 GMT", + "Content-Length", + "1325" + ] + ); -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities') +nock("https://endpoint", { encodedQueryParams: true }) + .post("/identities") .query(true) - .reply(200, {"id":"sanitized"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'MS-CV', - 'NQBZ+MnP30Kr1piaI9wTGA.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - 'sanitized', - 'api-supported-versions', - '2020-01-15-preview3, 2020-07-20-preview1, 2020-07-20-preview2', - 'X-Processing-Time', - '352ms', - 'X-Azure-Ref', - '0XQXhXwAAAACsqcU5c4vsQ4NpR+a8OpIFRVdSMzBFREdFMDYxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Mon, 21 Dec 2020 20:28:12 GMT' -]); + .reply(200, { id: "sanitized" }, [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "NQBZ+MnP30Kr1piaI9wTGA.0", + "Strict-Transport-Security", + "max-age=2592000", + "x-ms-client-request-id", + "sanitized", + "api-supported-versions", + "2020-01-15-preview3, 2020-07-20-preview1, 2020-07-20-preview2", + "X-Processing-Time", + "352ms", + "X-Azure-Ref", + "0XQXhXwAAAACsqcU5c4vsQ4NpR+a8OpIFRVdSMzBFREdFMDYxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Mon, 21 Dec 2020 20:28:12 GMT" + ]); -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/token', {"scopes":["chat"]}) +nock("https://endpoint", { encodedQueryParams: true }) + .post("/identities/sanitized/token", { scopes: ["chat"] }) .query(true) - .reply(200, {"id":"sanitized","token":"sanitized","expiresOn":"2020-12-22T20:28:12.8449526+00:00"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'MS-CV', - 'K8luOL9gOESaa1Uy4HCO8w.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - 'sanitized', - 'api-supported-versions', - '2020-01-15-preview3, 2020-07-20-preview1, 2020-07-20-preview2', - 'X-Processing-Time', - '287ms', - 'X-Azure-Ref', - '0XQXhXwAAAADVB+/PcTZUSY3XfyI3zwKjRVdSMzBFREdFMDYxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=', - 'Date', - 'Mon, 21 Dec 2020 20:28:13 GMT' -]); + .reply( + 200, + { id: "sanitized", token: "sanitized", expiresOn: "2020-12-22T20:28:12.8449526+00:00" }, + [ + "Transfer-Encoding", + "chunked", + "Content-Type", + "application/json; charset=utf-8", + "MS-CV", + "K8luOL9gOESaa1Uy4HCO8w.0", + "Strict-Transport-Security", + "max-age=2592000", + "x-ms-client-request-id", + "sanitized", + "api-supported-versions", + "2020-01-15-preview3, 2020-07-20-preview1, 2020-07-20-preview2", + "X-Processing-Time", + "287ms", + "X-Azure-Ref", + "0XQXhXwAAAADVB+/PcTZUSY3XfyI3zwKjRVdSMzBFREdFMDYxNAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE=", + "Date", + "Mon, 21 Dec 2020 20:28:13 GMT" + ] + ); diff --git a/sdk/communication/test-resources.json b/sdk/communication/test-resources.json index 0ee9bcfbad7d..20d5b53a2b41 100644 --- a/sdk/communication/test-resources.json +++ b/sdk/communication/test-resources.json @@ -18,7 +18,7 @@ "metadata": { "description": "The client OID to grant access to test resources." } - }, + } }, "variables": { "uniqueSubDomainName": "[format('{0}-{1}', parameters('baseName'), parameters('endpointPrefix'))]", @@ -46,6 +46,10 @@ } ], "outputs": { + "COMMUNICATION_ENDPOINT": { + "type": "string", + "value": "[concat('https://', parameters('baseName'), '-', parameters('endpointPrefix'), '.communication.azure.com')]" + }, "COMMUNICATION_CONNECTION_STRING": { "type": "string", "value": "[listKeys(resourceId('Microsoft.Communication/CommunicationServices',variables('uniqueSubDomainName')), '2020-08-20-preview').primaryConnectionString]"