diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 76511c6f2794..f2bedfc7c066 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -5954,8 +5954,8 @@ packages: yallist: 4.0.0 dev: false - /lru-cache/7.5.1: - resolution: {integrity: sha512-q1TS8IqKvcg3aScamKCHpepSrHF537Ww7nHahBOxhDu9D2YoBXAsj/7uFdZFj1xJr9LmyeJ62AdyofCHafUbIA==} + /lru-cache/7.5.0: + resolution: {integrity: sha512-8neUvdgNtubJ+VNNqrqOLjUoIlN+NRPFtv1Vne2rQ4uPCxhp0W4TlqntzTLnVVezGXcSSdXTrKCTYooEQA7X6g==} engines: {node: '>=12'} dev: false @@ -13751,7 +13751,7 @@ packages: dev: false file:projects/communication-identity.tgz: - resolution: {integrity: sha512-SQZalYHe9QZ9rG3hoyRKP8ag5LmObnwwhw5hTh+4WajHnfUU2/35fQxMQjQD6Px6Q5cHSNbaEAL4JtzmG68j9w==, tarball: file:projects/communication-identity.tgz} + resolution: {integrity: sha512-1tM+0PEXI9NF2zGpjIrsxgtCPK/gDjPVpIzexRBiNUe+570eFeG1vaa0Oz01Wtyq9zX0jab5kiSC8ENssu9GBg==, tarball: file:projects/communication-identity.tgz} name: '@rush-temp/communication-identity' version: 0.0.0 dependencies: @@ -13794,7 +13794,6 @@ packages: transitivePeerDependencies: - bufferutil - debug - - encoding - supports-color - utf-8-validate dev: false @@ -13909,7 +13908,7 @@ packages: dev: false file:projects/communication-short-codes.tgz: - resolution: {integrity: sha512-WwFds5Jll5VrVjGgeeodQu8a5k6lqUQw4pRKCGHJ+cU6ZjjfMuHGIk6r5g0YfXuq+Dioi05TcLphC21D1Cpl2g==, tarball: file:projects/communication-short-codes.tgz} + resolution: {integrity: sha512-SsNyYtLexrtLt4/pDhHBfg1dnwGlNMIUHhc8GDvnHHUyufkKdCxU1q8mEGQCdY1D4Dbd/Q01vhpHaxFNYeehIg==, tarball: file:projects/communication-short-codes.tgz} name: '@rush-temp/communication-short-codes' version: 0.0.0 dependencies: @@ -14347,7 +14346,7 @@ packages: dev: false file:projects/core-http.tgz: - resolution: {integrity: sha512-0FVqqxMmaS5b9gJAQBmon4VGSa8vMDyR2wqukGCB27gvIw8ciyzEg8GTyqWDlXs/9qs02FDrl2qJOvyirN8TIw==, tarball: file:projects/core-http.tgz} + resolution: {integrity: sha512-jiD6yigzItg43NzPs/AN8oxAa8fXDsZPx920Sq7DGPlslluxiFzwdrLV1AGEVLZJAtxr+hIQIozsQBm5MHBOhg==, tarball: file:projects/core-http.tgz} name: '@rush-temp/core-http' version: 0.0.0 dependencies: @@ -16564,7 +16563,7 @@ packages: karma-mocha-reporter: 2.2.5_karma@6.3.15 karma-source-map-support: 1.4.0 karma-sourcemap-loader: 0.3.8 - lru-cache: 7.5.1 + lru-cache: 7.5.0 mocha: 7.2.0 mocha-junit-reporter: 2.0.2_mocha@7.2.0 nyc: 15.1.0 diff --git a/sdk/communication/communication-identity/CHANGELOG.md b/sdk/communication/communication-identity/CHANGELOG.md index 452680c95854..9428d00b0651 100644 --- a/sdk/communication/communication-identity/CHANGELOG.md +++ b/sdk/communication/communication-identity/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Migrated from using `@azure/core-http` to `@azure/core-rest-pipeline` for the handling of HTTP requests. See [Azure Core v1 vs v2](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/documentation/core2.md) for more on the difference and benefits of the move. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/communication/communication-identity/karma.conf.js b/sdk/communication/communication-identity/karma.conf.js index 475fc334b882..1e29c6ae8b8b 100644 --- a/sdk/communication/communication-identity/karma.conf.js +++ b/sdk/communication/communication-identity/karma.conf.js @@ -1,12 +1,9 @@ // https://github.com/karma-runner/karma-chrome-launcher process.env.CHROME_BIN = require("puppeteer").executablePath(); require("dotenv").config(); -const { - jsonRecordingFilterFunction, - isPlaybackMode, - isSoftRecordMode, - isRecordMode, -} = require("@azure-tools/test-recorder"); +const { relativeRecordingsPath } = require("@azure-tools/test-recorder"); + +process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath(); module.exports = function (config) { config.set({ @@ -28,14 +25,10 @@ module.exports = function (config) { "karma-coverage", "karma-sourcemap-loader", "karma-junit-reporter", - "karma-json-to-file-reporter", - "karma-json-preprocessor", ], // list of files / patterns to load in the browser - files: ["dist-test/index.browser.js"].concat( - isPlaybackMode() || isSoftRecordMode() ? ["recordings/browsers/**/*.json"] : [] - ), + files: ["dist-test/index.browser.js"], // list of files / patterns to exclude exclude: [], @@ -44,7 +37,6 @@ module.exports = function (config) { // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { "**/*.js": ["sourcemap", "env"], - "recordings/browsers/**/*.json": ["json"], // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable //"dist-test/index.browser.js": ["coverage"] @@ -61,12 +53,13 @@ module.exports = function (config) { "AZURE_CLIENT_ID", "AZURE_CLIENT_SECRET", "AZURE_TENANT_ID", + "RECORDINGS_RELATIVE_PATH", ], // test results reporter to use // possible values: 'dots', 'progress' // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ["mocha", "coverage", "junit", "json-to-file"], + reporters: ["mocha", "coverage", "junit"], coverageReporter: { // specify a common output directory @@ -89,11 +82,6 @@ module.exports = function (config) { properties: {}, // key value pair of properties to add to the section of the report }, - jsonToFileReporter: { - filter: jsonRecordingFilterFunction, - outputPath: ".", - }, - // web server port port: 9876, @@ -130,9 +118,6 @@ module.exports = function (config) { browserNoActivityTimeout: 600000, browserDisconnectTimeout: 10000, browserDisconnectTolerance: 3, - browserConsoleLogOptions: { - terminal: !isRecordMode(), - }, client: { mocha: { diff --git a/sdk/communication/communication-identity/package.json b/sdk/communication/communication-identity/package.json index 69890e943a7e..b7665d781588 100644 --- a/sdk/communication/communication-identity/package.json +++ b/sdk/communication/communication-identity/package.json @@ -22,8 +22,8 @@ "extract-api": "tsc -p . && api-extractor run --local", "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"", "generate:client": "autorest --typescript ./swagger/README.md && rushx format", - "integration-test:browser": "karma start --single-run", - "integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace -t 300000 dist-esm/test/public/*.spec.js dist-esm/test/public/node/*.spec.js", + "integration-test:browser": "dev-tool run test:browser", + "integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 --exclude 'dist-esm/test/**/browser/*.spec.js' 'dist-esm/test/**/*.spec.js'", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", "lint": "eslint package.json api-extractor.json src test --ext .ts", @@ -32,10 +32,26 @@ "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", "test:watch": "npm run test -- --watch --reporter min", - "unit-test:browser": "karma start --single-run", - "unit-test:node": "mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"", + "unit-test:browser": "dev-tool run test:browser", + "unit-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 --exclude 'test/**/browser/*.spec.ts' 'test/**/*.spec.ts'", "unit-test": "npm run unit-test:node && npm run unit-test:browser" }, + "//metadata": { + "constantPaths": [ + { + "path": "src/generated/identityRestClientContext.ts", + "prefix": "packageDetails" + }, + { + "path": "src/constants.ts", + "prefix": "SDK_VERSION" + }, + { + "path": "swagger/README.md", + "prefix": "package-version" + } + ] + }, "//sampleConfiguration": { "productName": "Azure Communication Services - Identity", "productSlugs": [ @@ -72,9 +88,10 @@ "prettier": "@azure/eslint-plugin-azure-sdk/prettier.json", "dependencies": { "@azure/abort-controller": "^1.0.0", - "@azure/communication-common": "^1.1.0", + "@azure/communication-common": "^2.0.0", "@azure/core-auth": "^1.3.0", - "@azure/core-http": "^2.0.0", + "@azure/core-client": "^1.3.0", + "@azure/core-rest-pipeline": "^1.3.0", "@azure/core-lro": "^2.2.0", "@azure/core-paging": "^1.1.1", "@azure/core-tracing": "1.0.0-preview.13", @@ -83,11 +100,13 @@ "tslib": "^2.2.0" }, "devDependencies": { + "@azure/core-util": "^1.0.0-beta.1", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@azure/test-utils": "^1.0.0", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", "@azure/identity": "^2.0.1", + "@azure-tools/test-credential": "^1.0.0", "@microsoft/api-extractor": "^7.18.11", "@types/chai": "^4.1.6", "@types/mocha": "^7.0.2", @@ -104,8 +123,6 @@ "karma-env-preprocessor": "^0.1.1", "karma-firefox-launcher": "^1.1.0", "karma-ie-launcher": "^1.0.0", - "karma-json-preprocessor": "^0.3.3", - "karma-json-to-file-reporter": "^1.0.1", "karma-junit-reporter": "^2.0.1", "karma-mocha-reporter": "^2.2.5", "karma-mocha": "^2.0.1", diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.json index 9534dfa48e3e..5c816b730dd4 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.json @@ -1,32 +1,50 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "101", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:50:00 GMT", - "ms-cv": "3k7fmHKAJke4dqV/R8uTMg.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0KOluYQAAAACq6PSlX4dKRJGIxbvJ16ZeUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "95ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "fee82218733f79ddce34d3e1fc489a3c" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:33 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:35 GMT", + "MS-CV": "6MPyRkBte0WtlOHx\u002BrZD/g.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05PkuYgAAAAAj0Kyja2QtQJAahYePkcmMUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "27ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json index 041e2a32e609..15639012661f 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json @@ -1,32 +1,59 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"createTokenWithScopes\":[\"chat\",\"voip\"]}", - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"},\"accessToken\":{\"token\":\"sanitized\",\"expiresOn\":\"2021-10-20T15:50:03.0081466+00:00\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "927", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:50:02 GMT", - "ms-cv": "YaD06XJKVk6KNaVr0YZwJQ.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0KuluYQAAAACzciYFvOe+Q7UANqsZjTvwUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "174ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "6889b0baf9e4a63f8beeac7fe2bfe264" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "41", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "fYTayOkxDFdoXd25BoJTvoTLLr5\u002BQVfLFXvdJep6oNs=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:34 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "createTokenWithScopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "114", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:37 GMT", + "MS-CV": "cO45Xc362UWZjcMhnX2kFA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05fkuYgAAAABurLyYPUTUQK47Sn0HhLQuUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "46ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + }, + "accessToken": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:37.954027\u002B00:00" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_token.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_token.json index 009abc656f18..3c66cc476349 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_token.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_token.json @@ -1,32 +1,58 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"createTokenWithScopes\":[\"voip\"]}", - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"},\"accessToken\":{\"token\":\"sanitized\",\"expiresOn\":\"2021-10-20T15:50:01.4673188+00:00\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "920", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:50:00 GMT", - "ms-cv": "AEpA0tUvDkqopqbWWXjxXA.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0KeluYQAAAAA/nys8cvreQYHQjVSbRRUuUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "176ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "0875eb9b8d2965e53354c7ae16481c86" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "34", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "k4k9IoKBLYipoiXK3LctfBcfghISSb6AI45ji7ILZfg=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:33 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "createTokenWithScopes": [ + "voip" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "115", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:35 GMT", + "MS-CV": "MnhsOnGoukmZ4R31RjWDUA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05PkuYgAAAAAh27Bn/jM2Sr6d2C\u002Bk6gKxUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "43ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + }, + "accessToken": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:36.7139488\u002B00:00" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.json index df4efcae8237..479382d7704d 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.json @@ -1,53 +1,87 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "101", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:50:03 GMT", - "ms-cv": "rh/Dr5JbOkqK0PKcdIyH6g.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0K+luYQAAAADWedZVzfZSSLxJ2oZ55tbFUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "98ms" - } - }, - { - "method": "DELETE", - "url": "https://endpoint/identities/sanitized", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 204, - "response": "", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "date": "Tue, 19 Oct 2021 15:50:03 GMT", - "ms-cv": "f9Oj0jcmOU6/v9A85qqM6w.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0LOluYQAAAACd9l1tM2jnRojgpXKiS/puUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "185ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "20b8c3c054fc85be77c68f3962c7f977" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:35 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:38 GMT", + "MS-CV": "NXJaux\u002BqI0ONT5OkrZ3EDA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05vkuYgAAAACxmKvnZZPmTJJd6L\u002B2dPfEUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "34ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized?api-version=2021-10-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:36 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Date": "Mon, 14 Mar 2022 08:16:38 GMT", + "MS-CV": "7Xpd1WFIQkqfndZRReDmJQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05vkuYgAAAACZUkk1CaweTI8pJDelfM0vUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "97ms" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json index 30dd0e58da0b..c3416b97a1aa 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json @@ -1,55 +1,99 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "101", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:50:01 GMT", - "ms-cv": "fAjW7dqDSkqQJl2tCjvFOQ.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0KuluYQAAAAB8eB2DAPJ8SaDsQcOA3tPjUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "95ms" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/:issueAccessToken", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"scopes\":[\"chat\",\"voip\"]}", - "status": 200, - "response": "{\"token\":\"sanitized\",\"expiresOn\":\"2021-10-20T15:50:02.642183+00:00\"}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "810", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:50:01 GMT", - "ms-cv": "go069fbotEaN6b5D5iP4Xg.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0KuluYQAAAABkf4QXJvZ7Q4X17zxbFI1nUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "97ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "c65693e9b048a671a89d9f47969e5b57" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:34 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:36 GMT", + "MS-CV": "HtspnpfdqEiQOc099Z8zLw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05fkuYgAAAABjNqgCQWpUSb/hZjENajALUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "30ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "26", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "EqW/vFkRi/EMVlRLG6\u002Bkt0X27SowO7NytIh/miHOZlY=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:34 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "scopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "69", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:36 GMT", + "MS-CV": "jNUGILS8mkWbKoKraHf\u002BAg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05fkuYgAAAABNPAr6qd5qTqtyl8WA711\u002BUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "37ms" + }, + "ResponseBody": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:37.6783836\u002B00:00" + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_single_scope.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_single_scope.json index b1274fcb0e18..9b9a0a90a6e2 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_single_scope.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_single_scope.json @@ -1,55 +1,98 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "101", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:50:00 GMT", - "ms-cv": "3ZlfVKx9YkmRfSAcyMEdbw.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0KeluYQAAAABTmPyUwVxaQqKQo9Lv6qyDUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "91ms" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/:issueAccessToken", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"scopes\":[\"chat\"]}", - "status": 200, - "response": "{\"token\":\"sanitized\",\"expiresOn\":\"2021-10-20T15:50:02.0680763+00:00\"}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "804", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:50:01 GMT", - "ms-cv": "vH8lG9MeU0KLeqKXjlZRnw.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0KeluYQAAAAAamUB9evvxRLdke2Qe4VGRUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "102ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "61385498aabce6e765bac0336b80226d" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:33 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:36 GMT", + "MS-CV": "VcIydcEfWU\u002B3PnueMKQzLw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05PkuYgAAAAD2Q47Kw7t0Qo33ttDu90kCUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "27ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "19", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "J\u002BdoRQjtFVYLx3qOvzptwBLjQWqy6OEWEEk1TY1\u002BrT4=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:34 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "scopes": [ + "chat" + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "69", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:36 GMT", + "MS-CV": "FzspHV1h9EKjWRKnk\u002BiUvA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05fkuYgAAAABY30ltA1ibSJFTk7fPsECBUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "39ms" + }, + "ResponseBody": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:37.1979036\u002B00:00" + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.json index 6309cfe1f663..5b4af1a4d9bd 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.json @@ -1,53 +1,97 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"createTokenWithScopes\":[\"chat\",\"voip\"]}", - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"},\"accessToken\":{\"token\":\"sanitized\",\"expiresOn\":\"2021-10-20T15:50:03.3871981+00:00\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "927", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:50:02 GMT", - "ms-cv": "zEB3k8rUCUmlQjaz68H7YA.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0K+luYQAAAAC2opjuNVsyTZv1VRDwIYKEUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "173ms" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/:revokeAccessTokens", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 204, - "response": "", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "date": "Tue, 19 Oct 2021 15:50:02 GMT", - "ms-cv": "/N9KL8bOZkOVsRCaiDP9kQ.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0K+luYQAAAAD8AQr7wQEORadAovfy84pmUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "200ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "1bf6179be37702d1a62de2d6a0d076a7" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "41", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "fYTayOkxDFdoXd25BoJTvoTLLr5\u002BQVfLFXvdJep6oNs=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:35 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "createTokenWithScopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "115", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:37 GMT", + "MS-CV": "wQ\u002BUzfPaTUyS7D9LkA0LWA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05vkuYgAAAAB4BPGTXjRBTKnTeNJGbdgXUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "64ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + }, + "accessToken": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:38.2373293\u002B00:00" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:35 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Date": "Mon, 14 Mar 2022 08:16:37 GMT", + "MS-CV": "t82dpZSK4USLPNd08Ip86g.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05vkuYgAAAADMkp4yU4vSQqTcBKPQ3DRLUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "163ms" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user.json index e5f5029a91f2..6e1713a174fb 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user.json @@ -1,56 +1,48 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/SomeTenantId/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"sanitized\"}", - "responseHeaders": { - "cache-control": "no-store, no-cache", - "content-length": "1327", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:52 GMT", - "expires": "-1", - "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://endpoint/api/report?catId=GW+estsfd+ams2\"}]}", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.12108.11 - SCUS ProdSlices", - "x-ms-request-id": "00000000-0000-0000-0000-000000000000" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "101", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:52 GMT", - "ms-cv": "shqEWTA9kUu9eEaj6euI5w.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0IOluYQAAAACnTLW8D7lZR4KTYymoU2SpUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "86ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "fee82218733f79ddce34d3e1fc489a3c" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:29 GMT", + "MS-CV": "2rxWSxFKq0\u002BatfTWCJJWdw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "03fkuYgAAAAB4ZH7VBe7HT4T/vVw7xNjlUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "22ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json index 0a3b2a12268d..88d4ca48ee66 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json @@ -1,56 +1,57 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/SomeTenantId/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"sanitized\"}", - "responseHeaders": { - "cache-control": "no-store, no-cache", - "content-length": "1327", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:55 GMT", - "expires": "-1", - "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://endpoint/api/report?catId=GW+estsfd+ams2\"}]}", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.12108.11 - SCUS ProdSlices", - "x-ms-request-id": "00000000-0000-0000-0000-000000000000" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"createTokenWithScopes\":[\"chat\",\"voip\"]}", - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"},\"accessToken\":{\"token\":\"sanitized\",\"expiresOn\":\"2021-10-20T15:49:56.2932636+00:00\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "927", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:55 GMT", - "ms-cv": "0Ghhnq5UIkmmOOOGL0H40Q.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0JOluYQAAAABbfH7sWeoTRI+hoMcgvyqpUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "167ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "6889b0baf9e4a63f8beeac7fe2bfe264" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "41", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "createTokenWithScopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "115", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:31 GMT", + "MS-CV": "mpFoS9HAzkOhEtJZPPmvlw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "04PkuYgAAAAApM7mnucWqS4HfSxcaypA9UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "42ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + }, + "accessToken": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:32.2299488\u002B00:00" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_token.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_token.json index eab63809a1f5..c316a7072e62 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_token.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_token.json @@ -1,56 +1,56 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/SomeTenantId/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"sanitized\"}", - "responseHeaders": { - "cache-control": "no-store, no-cache", - "content-length": "1327", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:53 GMT", - "expires": "-1", - "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://endpoint/api/report?catId=GW+estsfd+ams2\"}]}", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.12108.11 - SCUS ProdSlices", - "x-ms-request-id": "00000000-0000-0000-0000-000000000000" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"createTokenWithScopes\":[\"voip\"]}", - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"},\"accessToken\":{\"token\":\"sanitized\",\"expiresOn\":\"2021-10-20T15:49:54.0943579+00:00\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "920", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:53 GMT", - "ms-cv": "cjDSpt5xY0CZdf0STKrr1g.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0IeluYQAAAAAH3XC4TfTBT4xy7cXSwsFSUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "168ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "0875eb9b8d2965e53354c7ae16481c86" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "34", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "createTokenWithScopes": [ + "voip" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "115", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:29 GMT", + "MS-CV": "KVhbDQhrVE\u002Bl7pILnld9DQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "03vkuYgAAAADkaF9gwGLeR7tvcwoLQxutUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "39ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + }, + "accessToken": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:30.3292657\u002B00:00" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_deletes_a_user.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_deletes_a_user.json index 296ba72b165e..5f2fadc531f3 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_deletes_a_user.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_deletes_a_user.json @@ -1,77 +1,83 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/SomeTenantId/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"sanitized\"}", - "responseHeaders": { - "cache-control": "no-store, no-cache", - "content-length": "1327", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:57 GMT", - "expires": "-1", - "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://endpoint/api/report?catId=GW+estsfd+ams2\"}]}", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.12108.11 - WUS2 ProdSlices", - "x-ms-request-id": "00000000-0000-0000-0000-000000000000" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "101", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:56 GMT", - "ms-cv": "qCXeVUtzWkWt2UqaumCUFA.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0JeluYQAAAAD+Yp5YDPv2ToWQtvXZUKhrUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "88ms" - } - }, - { - "method": "DELETE", - "url": "https://endpoint/identities/sanitized", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 204, - "response": "", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "date": "Tue, 19 Oct 2021 15:49:57 GMT", - "ms-cv": "3i36CQKXn0+/XC7YPZ0aBA.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0JeluYQAAAACcIr5JZLv7SZNWw4qTnQqqUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "200ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "20b8c3c054fc85be77c68f3962c7f977" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:32 GMT", + "MS-CV": "DhXAz8KoX0GR6ctjhs4zFA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "04fkuYgAAAABaT0oE\u002BSZXRLmONUQx0FLrUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "26ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized?api-version=2021-10-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Date": "Mon, 14 Mar 2022 08:16:33 GMT", + "MS-CV": "92T6ooLC3kalJGlnWbdrIg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "04fkuYgAAAABERYCrIHmTT7X7IFUuY/R5UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "152ms" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json index 15b143ae0a07..7d0dd707e86b 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json @@ -1,79 +1,95 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/SomeTenantId/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"sanitized\"}", - "responseHeaders": { - "cache-control": "no-store, no-cache", - "content-length": "1327", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:55 GMT", - "expires": "-1", - "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://endpoint/api/report?catId=GW+estsfd+ams2\"}]}", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.12108.11 - SCUS ProdSlices", - "x-ms-request-id": "00000000-0000-0000-0000-000000000000" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "101", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:54 GMT", - "ms-cv": "50wds6QSAk6b2C3iuKC+lg.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0I+luYQAAAAAygBngrmCvQI2svCY3EGTgUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "84ms" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/:issueAccessToken", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"scopes\":[\"chat\",\"voip\"]}", - "status": 200, - "response": "{\"token\":\"sanitized\",\"expiresOn\":\"2021-10-20T15:49:55.7499903+00:00\"}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "811", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:54 GMT", - "ms-cv": "lu9M3xNZKUSC4QPraFvasw.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0I+luYQAAAADvo+F/5V48SrWEH4di0u4VUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "98ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "c65693e9b048a671a89d9f47969e5b57" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:30 GMT", + "MS-CV": "YjgRVQ7LmUuNUxq1t\u002B\u002BjtQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "03/kuYgAAAAAw0mZ9mz6SRryB7veq\u002BCEhUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "25ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "26", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "scopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "69", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:30 GMT", + "MS-CV": "fInQFnIja0eTBJGPm9l2rA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "03/kuYgAAAABLo7NyE0VwSaTJyNIySVH7UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "32ms" + }, + "ResponseBody": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:31.7309507\u002B00:00" + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_single_scope.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_single_scope.json index c93bfec55e24..54760c3a83e5 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_single_scope.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_single_scope.json @@ -1,79 +1,94 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/SomeTenantId/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"sanitized\"}", - "responseHeaders": { - "cache-control": "no-store, no-cache", - "content-length": "1327", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:54 GMT", - "expires": "-1", - "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://endpoint/api/report?catId=GW+estsfd+ams2\"}]}", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.12108.11 - EUS ProdSlices", - "x-ms-request-id": "00000000-0000-0000-0000-000000000000" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "101", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:53 GMT", - "ms-cv": "KtnPBvOUMEe9CqiRBFHWQA.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0IuluYQAAAADAvPuQz1n9TpTlJO0GZJQdUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "85ms" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/:issueAccessToken", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"scopes\":[\"chat\"]}", - "status": 200, - "response": "{\"token\":\"sanitized\",\"expiresOn\":\"2021-10-20T15:49:54.9341419+00:00\"}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "804", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:54 GMT", - "ms-cv": "7tAjCrcPZkW0+lsBwtIBEA.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0IuluYQAAAAAgeMRa08NtSrNi/adTnwpaUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "103ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "61385498aabce6e765bac0336b80226d" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:30 GMT", + "MS-CV": "Skz3x3nTfEuMrvd2vL8AqQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "03vkuYgAAAAC5I/yycM8nS4iXsxUIG1AUUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "22ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "19", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "scopes": [ + "chat" + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "69", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:30 GMT", + "MS-CV": "y2VqNBV5QkehpuTtDik9gw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "03vkuYgAAAABV9dgMYe66SaGhQIrEptntUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "60ms" + }, + "ResponseBody": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:31.0409987\u002B00:00" + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_revokes_tokens_issued_for_a_user.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_revokes_tokens_issued_for_a_user.json index a4228c41207f..9a06251969cd 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_revokes_tokens_issued_for_a_user.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad/recording_successfully_revokes_tokens_issued_for_a_user.json @@ -1,77 +1,93 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/SomeTenantId/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"sanitized\"}", - "responseHeaders": { - "cache-control": "no-store, no-cache", - "content-length": "1327", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:56 GMT", - "expires": "-1", - "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://endpoint/api/report?catId=GW+estsfd+ams2\"}]}", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.12108.11 - WUS2 ProdSlices", - "x-ms-request-id": "00000000-0000-0000-0000-000000000000" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"createTokenWithScopes\":[\"chat\",\"voip\"]}", - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"},\"accessToken\":{\"token\":\"sanitized\",\"expiresOn\":\"2021-10-20T15:49:56.9283289+00:00\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "927", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:56 GMT", - "ms-cv": "TCaXHtdBgUCIIOgiDBiPcA.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0JOluYQAAAAAsPKbUj0nyQIxkq8TEswX9UFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "167ms" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/:revokeAccessTokens", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 204, - "response": "", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "date": "Tue, 19 Oct 2021 15:49:56 GMT", - "ms-cv": "VKCjQKPEg0K+/Wjx6+y9wA.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0JeluYQAAAAAYVt3EvnQ9SI28kQ8jTiDTUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "159ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "1bf6179be37702d1a62de2d6a0d076a7" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "41", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "createTokenWithScopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "115", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:31 GMT", + "MS-CV": "jsHfFRb\u002BzEurx7pW4LuAFQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "04PkuYgAAAACnBV6pSCzYR5Pnn\u002BweReM9UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "47ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + }, + "accessToken": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:32.6752442\u002B00:00" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Date": "Mon, 14 Mar 2022 08:16:32 GMT", + "MS-CV": "uNg7BjuTb0yrBisCbvlITA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "04PkuYgAAAAAljS3is1pOSIZxb/PyIc4TUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "121ms" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json index 5029a1b2a07d..171664d5fca3 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json @@ -1,55 +1,47 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/SomeTenantId/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"sanitized\"}", - "responseHeaders": { - "cache-control": "no-store, no-cache", - "content-length": "1327", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:50:00 GMT", - "expires": "-1", - "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://endpoint/api/report?catId=GW+estsfd+ams2\"}]}", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.12108.11 - NCUS ProdSlices", - "x-ms-request-id": "00000000-0000-0000-0000-000000000000" - } - }, - { - "method": "DELETE", - "url": "https://endpoint/identities/sanitized", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 401, - "response": "{\"error\":{\"code\":\"IdentityNotOwned\",\"message\":\"Provided identity doesn't belong to the resource.\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-type": "application/json", - "date": "Tue, 19 Oct 2021 15:49:59 GMT", - "ms-cv": "QgpNUvbYWk+7RuSXKYWHHA.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0KOluYQAAAADjuMyzDGXCTZ4OyF3mXlUlUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "16ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "d4c36d330cf943ffc89cfd00cc968d56" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities/sanitized?api-version=2021-10-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:35 GMT", + "MS-CV": "1i2/G6Dp1kyAVCsG8rRcfA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "04/kuYgAAAADYpkkxzHFTTZk238PtLXRUUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "22ms" + }, + "ResponseBody": { + "error": { + "code": "IdentityNotOwned", + "message": "Provided identity doesn\u0027t belong to the resource." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json index 31a34af3499e..849f302e125d 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json @@ -1,55 +1,54 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/SomeTenantId/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"sanitized\"}", - "responseHeaders": { - "cache-control": "no-store, no-cache", - "content-length": "1327", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:59 GMT", - "expires": "-1", - "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://endpoint/api/report?catId=GW+estsfd+ams2\"}]}", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.12108.11 - EUS ProdSlices", - "x-ms-request-id": "00000000-0000-0000-0000-000000000000" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/:issueAccessToken", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"scopes\":[\"chat\",\"voip\"]}", - "status": 401, - "response": "{\"error\":{\"code\":\"IdentityNotOwned\",\"message\":\"Provided identity doesn't belong to the resource.\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-type": "application/json", - "date": "Tue, 19 Oct 2021 15:49:59 GMT", - "ms-cv": "hDgNL9q2n02R+TxPa9NLyQ.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0J+luYQAAAAAEPbk9pm2KQZa84K2tp7LaUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "16ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "10130256303a888bdac5e1fc0ff89de0" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "26", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "scopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 401, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:34 GMT", + "MS-CV": "8M/ox\u002BuFFEGwjPbtRWkDZw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "04vkuYgAAAAByQOpHjRneSoLf9/cOIAREUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "17ms" + }, + "ResponseBody": { + "error": { + "code": "IdentityNotOwned", + "message": "Provided identity doesn\u0027t belong to the resource." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json index 818850964637..6101f039b579 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json @@ -1,78 +1,95 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/SomeTenantId/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"sanitized\"}", - "responseHeaders": { - "cache-control": "no-store, no-cache", - "content-length": "1327", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:58 GMT", - "expires": "-1", - "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://endpoint/api/report?catId=GW+estsfd+ams2\"}]}", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.12108.11 - EUS ProdSlices", - "x-ms-request-id": "00000000-0000-0000-0000-000000000000" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "101", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:49:57 GMT", - "ms-cv": "2afdS6gr0EGNVQGls+puqQ.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0JuluYQAAAAASC0Sdgt0wRbtOU79znuwIUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "89ms" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/:issueAccessToken", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"scopes\":[]}", - "status": 400, - "response": "{\"error\":{\"code\":\"ValidationError\",\"message\":\"Invalid scopes - Scopes field is required.\",\"target\":\"scopes\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-type": "application/json", - "date": "Tue, 19 Oct 2021 15:49:58 GMT", - "ms-cv": "8ijor8aMK0K+awlrlVFyBw.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0JuluYQAAAACKpVzfNcj8T4iDoCq6E+V9UFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "155ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "232c6a275a8bb301c5fb204cd5ea835a" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:33 GMT", + "MS-CV": "ynuruFpJvUmp\u002B4woWbs6nA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "04vkuYgAAAADqjbPbcMCmT5Unpe\u002B6BTXnUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "26ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "13", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "scopes": [] + }, + "StatusCode": 400, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:33 GMT", + "MS-CV": "ZYP3TVubA0\u002BLSHb6gkWFFA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "04vkuYgAAAAB\u002BSVTPXe8QTpSEFZoO0AOAUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "13ms" + }, + "ResponseBody": { + "error": { + "code": "ValidationError", + "message": "Invalid scopes - Scopes field is required.", + "target": "scopes" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json index 3e84305670c3..7f62f148af0d 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json @@ -1,55 +1,48 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/SomeTenantId/oauth2/v2.0/token", - "query": {}, - "requestBody": "response_type=token&grant_type=client_credentials&client_id=SomeClientId&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"sanitized\"}", - "responseHeaders": { - "cache-control": "no-store, no-cache", - "content-length": "1327", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:50:00 GMT", - "expires": "-1", - "nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://endpoint/api/report?catId=GW+estsfd+ams2\"}]}", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.12108.11 - EUS ProdSlices", - "x-ms-request-id": "00000000-0000-0000-0000-000000000000" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/:revokeAccessTokens", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 401, - "response": "{\"error\":{\"code\":\"IdentityNotOwned\",\"message\":\"Provided identity doesn't belong to the resource.\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-type": "application/json", - "date": "Tue, 19 Oct 2021 15:49:59 GMT", - "ms-cv": "5rHc0SDWlUacgjMBgz/0VQ.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0KOluYQAAAADQAGYSt6nERbAK41e56wSmUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "16ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "e538f8ef41e7abb62269601378045374" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:34 GMT", + "MS-CV": "kH0xdl0UcU6ds2XMOtBSmg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "04/kuYgAAAABxAcur\u002BJMXQJp3Kh7xq2kwUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "14ms" + }, + "ResponseBody": { + "error": { + "code": "IdentityNotOwned", + "message": "Provided identity doesn\u0027t belong to the resource." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json index f5ad7dcf728e..142b02caf7fb 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json @@ -1,31 +1,49 @@ { - "recordings": [ - { - "method": "DELETE", - "url": "https://endpoint/identities/sanitized", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 401, - "response": "{\"error\":{\"code\":\"IdentityNotOwned\",\"message\":\"Provided identity doesn't belong to the resource.\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-type": "application/json", - "date": "Tue, 19 Oct 2021 15:50:04 GMT", - "ms-cv": "VQy68d3IM0KJGtN0szw/pA.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0LeluYQAAAADMfv1CfMGDQriZALZGJHsKUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "18ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "d4c36d330cf943ffc89cfd00cc968d56" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities/sanitized?api-version=2021-10-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:37 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:39 GMT", + "MS-CV": "SExzbaIU2Ee9FVdCsdQQrA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "06PkuYgAAAACzO73/0u3ERa2k8oOegP1FUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "33ms" + }, + "ResponseBody": { + "error": { + "code": "IdentityNotOwned", + "message": "Provided identity doesn\u0027t belong to the resource." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json index 67f8f371b8ad..2ee34db64bcd 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json @@ -1,31 +1,56 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/:issueAccessToken", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"scopes\":[\"chat\",\"voip\"]}", - "status": 401, - "response": "{\"error\":{\"code\":\"IdentityNotOwned\",\"message\":\"Provided identity doesn't belong to the resource.\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-type": "application/json", - "date": "Tue, 19 Oct 2021 15:50:04 GMT", - "ms-cv": "F9hLXWKaFkyuI0BRM8fK1w.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0LeluYQAAAAB7MKqm6qCTRLCLuN1uq9BUUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "19ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "10130256303a888bdac5e1fc0ff89de0" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "26", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "EqW/vFkRi/EMVlRLG6\u002Bkt0X27SowO7NytIh/miHOZlY=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:36 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "scopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 401, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:39 GMT", + "MS-CV": "lZDV3hWs5UePRqwHOA08yQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "05/kuYgAAAABUVQ\u002BveqB7S4ogw72UukoUUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "20ms" + }, + "ResponseBody": { + "error": { + "code": "IdentityNotOwned", + "message": "Provided identity doesn\u0027t belong to the resource." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json index ac9c32cab798..f222f92aaf96 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json @@ -1,54 +1,99 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/identities", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 201, - "response": "{\"identity\":{\"id\":\"sanitized\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-length": "101", - "content-type": "application/json; charset=utf-8", - "date": "Tue, 19 Oct 2021 15:50:03 GMT", - "ms-cv": "AKQlfyJ0UECLjwi/8QfAnQ.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0LOluYQAAAACoBBYD307/T6T26IvWgxLAUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "97ms" - } - }, - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/:issueAccessToken", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": "{\"scopes\":[]}", - "status": 400, - "response": "{\"error\":{\"code\":\"ValidationError\",\"message\":\"Invalid scopes - Scopes field is required.\",\"target\":\"scopes\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-type": "application/json", - "date": "Tue, 19 Oct 2021 15:50:04 GMT", - "ms-cv": "9NFf33nFnUOhvsobWCoLZw.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0LOluYQAAAAAh6Eju1bBRS7sAygz9D9A/UFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "27ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "232c6a275a8bb301c5fb204cd5ea835a" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:36 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:38 GMT", + "MS-CV": "SuTmDiPQfk2gyriCFb3Saw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "05/kuYgAAAACf0zlrO5ZLSJKFhzoXTO1eUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "35ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "13", + "Content-Type": "application/json", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "60\u002BXGy/KS72mYCMozQDW1tzfkFvdp5Qzbvub34UOQ5s=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:36 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": { + "scopes": [] + }, + "StatusCode": 400, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:38 GMT", + "MS-CV": "5xtvYkIXk0STTji4Iqsjxg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "05/kuYgAAAABH8P4QhsmlQpkYEi0m\u002B2yZUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "21ms" + }, + "ResponseBody": { + "error": { + "code": "ValidationError", + "message": "Invalid scopes - Scopes field is required.", + "target": "scopes" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json index 535cb99530ba..c1168d349382 100644 --- a/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json +++ b/sdk/communication/communication-identity/recordings/browsers/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json @@ -1,31 +1,50 @@ { - "recordings": [ - { - "method": "POST", - "url": "https://endpoint/identities/sanitized/:revokeAccessTokens", - "query": { - "api-version": "2021-10-31-preview" - }, - "requestBody": null, - "status": 401, - "response": "{\"error\":{\"code\":\"IdentityNotOwned\",\"message\":\"Provided identity doesn't belong to the resource.\"}}", - "responseHeaders": { - "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview", - "content-type": "application/json", - "date": "Tue, 19 Oct 2021 15:50:04 GMT", - "ms-cv": "2XPKbzc0D0uweXXXzIxgVQ.0", - "request-context": "appId=", - "strict-transport-security": "max-age=2592000", - "x-azure-ref": "0LeluYQAAAABOTXXIRTiSQ5fvmgS67mlAUFJHMDFFREdFMDcxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", - "x-cache": "CONFIG_NOCACHE", - "x-ms-client-request-id": "00000000-0000-0000-0000-000000000000", - "x-processing-time": "21ms" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - }, - "hash": "e538f8ef41e7abb62269601378045374" -} \ No newline at end of file + "Entries": [ + { + "RequestUri": "https://endpoint/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "cs", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4577.0 Safari/537.36", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:37 GMT", + "x-ms-useragent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:39 GMT", + "MS-CV": "SwsaqQtPuUioRrWMN6MYVQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "05/kuYgAAAAAZDlHTOkLzQaIwMcFwLPtrUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "21ms" + }, + "ResponseBody": { + "error": { + "code": "IdentityNotOwned", + "message": "Provided identity doesn\u0027t belong to the resource." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.js deleted file mode 100644 index 13cf68322ff7..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.js +++ /dev/null @@ -1,33 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "fcacb73f267942c3066b7c194d71d659"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities') - .query(true) - .reply(201, {"identity":{"id":"sanitized"}}, [ - 'Content-Length', - '101', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'kDXmUWT3jEyMeW7F8eCz9A.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '112ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0GMppYQAAAADaLEFed29fTK/ExzEX8UkGUFJHMDFFREdFMDkwOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:09 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.json new file mode 100644 index 000000000000..27a91643ed05 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user.json @@ -0,0 +1,41 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:11 GMT" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:13 GMT", + "MS-CV": "8zNhAn0aDUCKYLgyYXiDwg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0zvkuYgAAAADEsPtqQArkSLNlm2kUAoRxUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "72ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.js deleted file mode 100644 index bb921a08d76d..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.js +++ /dev/null @@ -1,33 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "7cee7a0e91dc66f6e8f6361b9e827682"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities', {"createTokenWithScopes":["chat","voip"]}) - .query(true) - .reply(201, {"identity":{"id":"sanitized"},"accessToken":{"token":"sanitized","expiresOn":"2021-10-16T18:36:12.4119158+00:00"}}, [ - 'Content-Length', - '927', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'xADuPJm1LEKkqR2EIZ1MTw.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '188ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0G8ppYQAAAADWCLaYP/h0R7knzBOZXlIiUFJHMDFFREdFMDcxMwBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:12 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json new file mode 100644 index 000000000000..9688047d055b --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json @@ -0,0 +1,50 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "41", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "fYTayOkxDFdoXd25BoJTvoTLLr5\u002BQVfLFXvdJep6oNs=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:12 GMT" + }, + "RequestBody": { + "createTokenWithScopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "115", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:15 GMT", + "MS-CV": "UwWNHsgY5E\u002Ba8Jk7qDzUIg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0z/kuYgAAAAAbuhWsf91PQqMbf\u002BeIomSaUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "58ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + }, + "accessToken": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:15.7616107\u002B00:00" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_token.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_token.js deleted file mode 100644 index e4339243a882..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_token.js +++ /dev/null @@ -1,33 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "d7eadbc8a968a289583d50074b0f71d2"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities', {"createTokenWithScopes":["voip"]}) - .query(true) - .reply(201, {"identity":{"id":"sanitized"},"accessToken":{"token":"sanitized","expiresOn":"2021-10-16T18:36:09.6070839+00:00"}}, [ - 'Content-Length', - '920', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'szES1dMgxUmv0PN4enUCig.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '182ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0GcppYQAAAACwOiPRFaD3SYwB3J0GByJxUFJHMDFFREdFMDcxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:09 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_token.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_token.json new file mode 100644 index 000000000000..0b8679e8ede8 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_creates_a_user_and_token.json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "34", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "k4k9IoKBLYipoiXK3LctfBcfghISSb6AI45ji7ILZfg=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:11 GMT" + }, + "RequestBody": { + "createTokenWithScopes": [ + "voip" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "115", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:13 GMT", + "MS-CV": "UCb7HKIyNE2Q84oN48iiGg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0zvkuYgAAAAAGD5RLpHNERIL4AWqaYmEQUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "48ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + }, + "accessToken": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:14.5611624\u002B00:00" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.js deleted file mode 100644 index 69bd0ae4da3e..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.js +++ /dev/null @@ -1,57 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "c43ca28e535afc7fa59c4926d1c1d188"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities') - .query(true) - .reply(201, {"identity":{"id":"sanitized"}}, [ - 'Content-Length', - '101', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'zbsRahYeTkeQoApFjaLo7A.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '106ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0HcppYQAAAABA+/NOvhZTTL7s+DDK3PnQUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:13 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .delete('/identities/sanitized') - .query(true) - .reply(204, "", [ - 'Request-Context', - 'appId=', - 'MS-CV', - 'IJHJbmDe5EWa7WBiNWdbuQ.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '173ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0HcppYQAAAAAhDax3DlP1Rosh/6zBtyNtUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:13 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.json new file mode 100644 index 000000000000..cf34b60cbb4f --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_deletes_a_user.json @@ -0,0 +1,69 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:13 GMT" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:15 GMT", + "MS-CV": "RaAZkTgu0UegYkeK/DXkvQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "00PkuYgAAAACnupvFfLsGTKv/LnhBg\u002BmLUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "34ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized?api-version=2021-10-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:13 GMT" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Date": "Mon, 14 Mar 2022 08:16:16 GMT", + "MS-CV": "Nc0opbmQ1UidCD2\u002BZ\u002BZD8w.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "00PkuYgAAAACs70I4f2cTQJGHXR8J62nyUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "147ms" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_multiple_scopes.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_multiple_scopes.js deleted file mode 100644 index 2151f9687bcb..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_multiple_scopes.js +++ /dev/null @@ -1,61 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "7109ea8d6ec0bd806a842601669f7996"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities') - .query(true) - .reply(201, {"identity":{"id":"sanitized"}}, [ - 'Content-Length', - '101', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'UD2i0BQP7USloRUq6X+coQ.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '98ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0GsppYQAAAAAusNstrZjyQ7nW68SAqHZ6UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:10 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/:issueAccessToken', {"scopes":["chat","voip"]}) - .query(true) - .reply(200, {"token":"sanitized","expiresOn":"2021-10-16T18:36:11.4449862+00:00"}, [ - 'Content-Length', - '811', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'g14mPTB0+EycfwdTfe89Ow.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '111ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0G8ppYQAAAACJfn2+UxuuTI3EimD356wiUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:11 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json new file mode 100644 index 000000000000..a1b36086606e --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json @@ -0,0 +1,81 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:12 GMT" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:14 GMT", + "MS-CV": "zPqJgeTn/EeX1thq8Pzwug.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0z/kuYgAAAADMod2XAzrsRJnAWKoSNIe5UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "25ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "26", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "EqW/vFkRi/EMVlRLG6\u002Bkt0X27SowO7NytIh/miHOZlY=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:12 GMT" + }, + "RequestBody": { + "scopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "69", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:14 GMT", + "MS-CV": "2kJIuQEiI0yFrl7BNUeENQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0z/kuYgAAAACjEMS3ETcVR7tfiJzM2kuvUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "33ms" + }, + "ResponseBody": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:15.4900159\u002B00:00" + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_single_scope.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_single_scope.js deleted file mode 100644 index 0868102df8c4..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_single_scope.js +++ /dev/null @@ -1,61 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "1d0172b0809683a9bb1931e1b3295bef"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities') - .query(true) - .reply(201, {"identity":{"id":"sanitized"}}, [ - 'Content-Length', - '101', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'w45YgyndDEOlqYC3VEZCNA.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '105ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0GcppYQAAAABXt/z8f924SZ63FTcijyGQUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:10 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/:issueAccessToken', {"scopes":["chat"]}) - .query(true) - .reply(200, {"token":"sanitized","expiresOn":"2021-10-16T18:36:10.7837509+00:00"}, [ - 'Content-Length', - '804', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'T069klKJWUmwnMrexGUXfg.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '109ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0GsppYQAAAAAJhGnh1iIIS580JqXUUP6SUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:10 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_single_scope.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_single_scope.json new file mode 100644 index 000000000000..5836429ca40d --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_gets_a_token_for_a_user_single_scope.json @@ -0,0 +1,80 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:11 GMT" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:14 GMT", + "MS-CV": "l3gRkFT4ZUCJoZ8nY9bGtw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0zvkuYgAAAACgO06V2bd8RLl/s1/Y8DKMUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "26ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "19", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "J\u002BdoRQjtFVYLx3qOvzptwBLjQWqy6OEWEEk1TY1\u002BrT4=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:11 GMT" + }, + "RequestBody": { + "scopes": [ + "chat" + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "69", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:14 GMT", + "MS-CV": "9WbgKpI110aUSQwApn6r8w.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0zvkuYgAAAAD0efb3xSw2So6ANvcnfvq2UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "36ms" + }, + "ResponseBody": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:15.0300247\u002B00:00" + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.js deleted file mode 100644 index a5f72fc9c09e..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.js +++ /dev/null @@ -1,57 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "b6315c3102987354fe49806f064f6b1b"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities', {"createTokenWithScopes":["chat","voip"]}) - .query(true) - .reply(201, {"identity":{"id":"sanitized"},"accessToken":{"token":"sanitized","expiresOn":"2021-10-16T18:36:12.8639829+00:00"}}, [ - 'Content-Length', - '927', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'a7VwO2KV0EuGDplLnXZa0g.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '192ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0HMppYQAAAAAqof0PoCYZQrJL8sCY12hXUFJHMDFFREdFMDYxNgBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:12 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/:revokeAccessTokens') - .query(true) - .reply(204, "", [ - 'Request-Context', - 'appId=', - 'MS-CV', - 'ev1vZ5mIZUC9BSXJDo636g.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '173ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0HMppYQAAAAAS2CBnPu07RawVGXOIQh2wUFJHMDFFREdFMDYxNgBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:12 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.json new file mode 100644 index 000000000000..d897a72e85c6 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive/recording_successfully_revokes_tokens_issued_for_a_user.json @@ -0,0 +1,79 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "41", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "fYTayOkxDFdoXd25BoJTvoTLLr5\u002BQVfLFXvdJep6oNs=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:12 GMT" + }, + "RequestBody": { + "createTokenWithScopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "115", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:15 GMT", + "MS-CV": "F7hlzh13AUWnaLGP\u002BZIOEA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0z/kuYgAAAAB6XYEomoqJR59p9zQ2MY\u002BSUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "47ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + }, + "accessToken": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:16.0270872\u002B00:00" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:13 GMT" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Date": "Mon, 14 Mar 2022 08:16:15 GMT", + "MS-CV": "Cbii/8kCh0il3Zygi5ynNw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "00PkuYgAAAABkiICsPSdPSrcIHc5t2Q57UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "121ms" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user.js deleted file mode 100644 index 4330bfe38d89..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user.js +++ /dev/null @@ -1,139 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "fcacb73f267942c3066b7c194d71d659"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.11 - WEULR1 ProdSlices', - 'Set-Cookie', - 'fpc=AlUspz_OTT9GvU6O_6_c2U4; expires=Sun, 14-Nov-2021 18:35:53 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrkarTqpuwrLr6vrSRg44-9C-Cf_mdnAwW_sbirkYKbNgX4Mc1r6NXooB4fT-1v6ykqdMxDwyCu9UlcLuU2eZy0dts8-qTEp8bsQ8fa6ZCGMaK-7qboLmDJQTAXlSWbfTNYiqnM-ejDwEcRUQS7QJxN19d2W0AHdL1gUUxgYEapPsgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:53 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - NCUS ProdSlices', - 'Set-Cookie', - 'fpc=AnEJS6FqwZxJpYPnva1Zkfg; expires=Sun, 14-Nov-2021 18:35:54 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrZs-Mgb-btjiE4OdA1oi1VvQgM11SxDZDYN-PRfemyTHKynHgGz1uvNmesgSqCZI0ORFSBmnOOucIJO6MMag4AnRPUU7jPKOfrCxf8MgVBmEk9kncLOOG6idnuExVS7QNODOpN6AsMkcO2PaxTqjuA8QZrnA3qIfT3mhPL7zpmKQgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:53 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - NCUS ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Ag-YE21nFxtFqo9OYde6IfAo7iuqAQAAAArB-9gOAAAA; expires=Sun, 14-Nov-2021 18:35:54 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:54 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities') - .query(true) - .reply(201, {"identity":{"id":"sanitized"}}, [ - 'Content-Length', - '101', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'Yiq0PsQpmkOeWm2TBX2Qxw.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '270ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0CsppYQAAAAB7oL/u2dpzQINzTJigRv2kUFJHMDFFREdFMDkwOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:35:54 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user.json new file mode 100644 index 000000000000..b6a24394cd08 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user.json @@ -0,0 +1,39 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:05 GMT", + "MS-CV": "6FmnZ90kFkmY0vK46GEpXw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0xfkuYgAAAADNdb7LvXWsRJtGm\u002B8gXZG6UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "33ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.js deleted file mode 100644 index 838fa2732770..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.js +++ /dev/null @@ -1,139 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "7cee7a0e91dc66f6e8f6361b9e827682"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - WEULR2 ProdSlices', - 'Set-Cookie', - 'fpc=AkmWR9wQf41NgpEx-BGuIr0; expires=Sun, 14-Nov-2021 18:35:59 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrZr9zdFedCfgdJRphFRrJwgNRPkLssijPUluPUuAx_f7qzrr4Au49twNwFnBszc2OBQQnUTr0igdd7TEVLea6Rp6hrayVT-Xz_MNatkrEr-d-XL9aik_URMUxO3qaVn6YQSSO1xalC_Xo60uAUma4oMO85nFIILu-Hu48MtSUbUIgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:59 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - NCUS ProdSlices', - 'Set-Cookie', - 'fpc=AhwMaO64MjVPtQ97B44BzCM; expires=Sun, 14-Nov-2021 18:35:59 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr_beZHHFCKMnQSq85V-DyAWFlMxCzfnDrtga6nibn3DvJZxk1RK79idlSL_o9OqIgFWxttpQ5Uv6VM6iS2EcJ9LgCTyftHPQgt24myPc03dbV_DfsaPdxgW84XvG1efCPfTQ1C6AcEsxj104esrVABIJkrmMKUrHWLunOCAVsWswgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:59 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - NCUS ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AtWEwgOwMYNAgK59_O7iLGI; expires=Sun, 14-Nov-2021 18:36:00 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:59 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities', {"createTokenWithScopes":["chat","voip"]}) - .query(true) - .reply(201, {"identity":{"id":"sanitized"},"accessToken":{"token":"sanitized","expiresOn":"2021-10-16T18:36:01.1600993+00:00"}}, [ - 'Content-Length', - '927', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'uicIr7Lc+0qos1MULA7vZg.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '299ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0EMppYQAAAADn4Ncs5hS7S7NqOydahEsHUFJHMDFFREdFMDkwNgBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:01 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json new file mode 100644 index 000000000000..0f3226dc97b5 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_gets_a_token_in_a_single_request.json @@ -0,0 +1,48 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "41", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": { + "createTokenWithScopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "115", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:08 GMT", + "MS-CV": "slsVRFCBikGkblfeFQCabA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0yfkuYgAAAACMhHCUpGsWTr5pjPOwYTzAUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "38ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + }, + "accessToken": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:09.2169469\u002B00:00" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_token.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_token.js deleted file mode 100644 index 8b8251453fc9..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_token.js +++ /dev/null @@ -1,139 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "d7eadbc8a968a289583d50074b0f71d2"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - NEULR1 ProdSlices', - 'Set-Cookie', - 'fpc=AmHyN3lgcl5PmeSio-F0uPw; expires=Sun, 14-Nov-2021 18:35:55 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr2iKMIBqU6XbKVnQUV9Fe8DSPDwv11jHOwfDIscGIFRvIUn8RZ2pmifyrdQB5HE1Lc2IllYmaMk4P7lyifC-YLzJxqPVa46f5OLWX0sy29ASPUO8ON4I6Jf9FR1Vsc1nHGDAP6NR72NJSzci7xpM4VUbwHWxJVgfug_jSEYqE6AggAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:55 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - SCUS ProdSlices', - 'Set-Cookie', - 'fpc=Aja86jSt-spBrj39UAkOaqQ; expires=Sun, 14-Nov-2021 18:35:55 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr89iUvnsDpZ0NKLHUGW9078yn20VxSIfdJpmlWsouPo0jxfrRlR5va2kAXNnybAWkWYM9fpeO9zb_Hain_CbZ9UJYSk-nifAzmKTFLzyuDjf7AkT6pXQMMhy0kIUemUBtggaBmMbltP-dl88kRvXOuYg2ynxgcCZwYvW3-ZOrrs4gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:55 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - NCUS ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AhjjcQG90KVHuqejnpvTSEgo7iuqAQAAAAvB-9gOAAAA; expires=Sun, 14-Nov-2021 18:35:55 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:55 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities', {"createTokenWithScopes":["voip"]}) - .query(true) - .reply(201, {"identity":{"id":"sanitized"},"accessToken":{"token":"sanitized","expiresOn":"2021-10-16T18:35:56.524298+00:00"}}, [ - 'Content-Length', - '919', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'EJ0NTxav5EWy7RXHurNfdw.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '373ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0DMppYQAAAAAhXMmOoHwmSJIc+omrTIdvUFJHMDFFREdFMDcxNwBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:35:56 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_token.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_token.json new file mode 100644 index 000000000000..608869569e39 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_creates_a_user_and_token.json @@ -0,0 +1,47 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "34", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": { + "createTokenWithScopes": [ + "voip" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "114", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:06 GMT", + "MS-CV": "utiKSJ632kS7fQ34q\u002Ba0Bw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0xvkuYgAAAABAB2zrLIRbR638KS76t247UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "43ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + }, + "accessToken": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:06.730992\u002B00:00" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_deletes_a_user.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_deletes_a_user.js deleted file mode 100644 index 36be2b4081cf..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_deletes_a_user.js +++ /dev/null @@ -1,163 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "c43ca28e535afc7fa59c4926d1c1d188"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.11 - WEULR1 ProdSlices', - 'Set-Cookie', - 'fpc=ApcjFR4TmS1PoaNfTcWtzcQ; expires=Sun, 14-Nov-2021 18:36:03 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr15a0F-RLIK0IPYwqwyv0DOsAr5nCh5_u-plQ6lfsL6C7UHs8BS_CIj_cMrcPwZAihZQOOHvu30VC-f4oe4yQNwnILgZv2iwC1E-atq7RLSECreRl2zndTdggF9lXfNrTrClFngQuQ9doZZ6LfopBnY8KzWSosnTBFXYpEZp2o0IgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:02 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - EUS ProdSlices', - 'Set-Cookie', - 'fpc=Au4w9jeW_v1MsJcvNp23wAk; expires=Sun, 14-Nov-2021 18:36:03 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrcT_bISj1RzBqZ9xXbeaGifn7jxwWPpTeYtL-r5mLZ9-Dq9oXsIL40-mq7iCO3G7JrxMEn9EyCdGn2B_xmO5aDF07vdU4amfEGb-x2WGHAwijS4PNsabe6E8hvdi_RTjpvG_F1Xo7oNFTsmO5a_CNU2r4_ff6U_bcxs8YjnO05H0gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:03 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.11 - WUS2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=ArkRYVaSY_dEmBQWXAs0y68; expires=Sun, 14-Nov-2021 18:36:03 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:03 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities') - .query(true) - .reply(201, {"identity":{"id":"sanitized"}}, [ - 'Content-Length', - '101', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'zfDLZfi32k+/CVmiLp65Dw.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '90ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0E8ppYQAAAADwQhpS8kWdQ4xj+JfNDlR2UFJHMDFFREdFMDYwNgBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:04 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .delete('/identities/sanitized') - .query(true) - .reply(204, "", [ - 'Request-Context', - 'appId=', - 'MS-CV', - '4Nkw/2ICv06xvDJ16GEqqw.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '250ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0FMppYQAAAABAlMq2K+J0Qr+osSH1ISj3UFJHMDFFREdFMDYwNgBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:04 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_deletes_a_user.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_deletes_a_user.json new file mode 100644 index 000000000000..122ce52d9166 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_deletes_a_user.json @@ -0,0 +1,65 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:10 GMT", + "MS-CV": "pQHTkSEQ\u002BUO/7U6\u002Byh/wAg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0yvkuYgAAAAAKpeuuyrAVSoUTlKbxoy6nUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "22ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized?api-version=2021-10-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Date": "Mon, 14 Mar 2022 08:16:10 GMT", + "MS-CV": "Vgr2u/YaaEqdQgC23TbGvg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0yvkuYgAAAACRxmmb/YrmSLZflCWW2J/dUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "144ms" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_multiple_scopes.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_multiple_scopes.js deleted file mode 100644 index c39df0475f9b..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_multiple_scopes.js +++ /dev/null @@ -1,167 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "7109ea8d6ec0bd806a842601669f7996"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.11 - WEULR2 ProdSlices', - 'Set-Cookie', - 'fpc=ApRbjD4YnctHp20deRdgYUA; expires=Sun, 14-Nov-2021 18:35:58 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrqh1O5Iz6EsD_JFw0Lid1OrzfDybVNUipF7iHxCkcLmqItOob8-38Nnvi6YXOPtz8LD4Qmustcv94_cuE3tjZEz-GylpQ2QgCNqguxjs9UhK1_EyvOrZHd1CO9nPcB_sLQ8zcdPlJ2m0aPtRNEvYRPkTh0xdb0Vpky9L5a8UzhnEgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:58 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - SCUS ProdSlices', - 'Set-Cookie', - 'fpc=AmtB_Bz4IjhJvoaMu7_z4IE; expires=Sun, 14-Nov-2021 18:35:58 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrCxVPUDMAkEDYGBJIFFQqjfjHjQmhNIdSUxV1N4pA5Ho0Y_iqQh2XR2Vp1uZVWZ4AHxg3GAVBVJBvvI8cF7IiTal0ZhTuZmHhOe0gCUmQvLpUmAwmNeAb1DLUB-Xk2tAS_zuKqenpRoJo4na_HLRg6nNr0kP0uesNL2pueJqyPwkgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:58 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - SCUS ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Ap6VvaVWf01Dn1n64JveHpso7iuqAQAAAA7B-9gOAAAA; expires=Sun, 14-Nov-2021 18:35:58 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:58 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities') - .query(true) - .reply(201, {"identity":{"id":"sanitized"}}, [ - 'Content-Length', - '101', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'c/QWCHjABUeqGCGeHbXCiw.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '91ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0DsppYQAAAAAVLAQYiVc6Rbly1iO34Ca/UFJHMDFFREdFMDYwOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:35:58 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/:issueAccessToken', {"scopes":["chat","voip"]}) - .query(true) - .reply(200, {"token":"sanitized","expiresOn":"2021-10-16T18:35:59.7063416+00:00"}, [ - 'Content-Length', - '811', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'jEY7C0UyC0ONJpiGEpz7AQ.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '102ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0D8ppYQAAAADVfcMaBV2lTLehnAzISYZbUFJHMDFFREdFMDYwOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:35:58 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json new file mode 100644 index 000000000000..f135d8db12e9 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_multiple_scopes.json @@ -0,0 +1,77 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:07 GMT", + "MS-CV": "Syycumgd0Ea4HeSjFRonmQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0yPkuYgAAAABgP07G/SJTRpkZSCnaeugrUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "26ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "26", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": { + "scopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "69", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:07 GMT", + "MS-CV": "pPd14bXa5EuUHSgepITWhg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0yPkuYgAAAACa1idOMQmUTI3sSQkMoO8EUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "36ms" + }, + "ResponseBody": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:08.5366948\u002B00:00" + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_single_scope.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_single_scope.js deleted file mode 100644 index cfa681e780e6..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_single_scope.js +++ /dev/null @@ -1,167 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "1d0172b0809683a9bb1931e1b3295bef"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - NEULR1 ProdSlices', - 'Set-Cookie', - 'fpc=AtavuRtukndFn7mUTUQ1pyY; expires=Sun, 14-Nov-2021 18:35:56 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrLetQ2znmDi7GQ_S8fU9fnguWoKyK7nXiFbSFcsxhY4Wd_-ujdSBCwRyWchx2ca_dEgcB6Nt94ePgKTHnVonhWgLEaQpHPFxb_RokHJuDIvj-_-JWIdBIOQZv6hst0LPyApwUg2Yr14xJmcis4Pd7UfZmVv-AOjdZKewMNhpO2WUgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:56 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - SCUS ProdSlices', - 'Set-Cookie', - 'fpc=AkWM4yq6VwtNh4wGwDVEVL0; expires=Sun, 14-Nov-2021 18:35:56 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr_-tP1b6TSF3Va7B6dnpb7FApdEk0SGROgJxWJHFH7zXmG7XLfR3-cJOwpu00U4XWyCCmSCtDNmIkJLkFUEnOGhopV5dOgeGNiyQOvHexqhvirFt5XeGC9HeHecNoZOoIXVqgcKMqX3DvI2sRjtzmiFvkD9Aj-7CfB_3ZebXrjekgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:56 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.11 - WUS2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AsReNkR7Q6ZFjadKAbfNEOoo7iuqAQAAAAzB-9gOAAAA; expires=Sun, 14-Nov-2021 18:35:56 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:35:56 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities') - .query(true) - .reply(201, {"identity":{"id":"sanitized"}}, [ - 'Content-Length', - '101', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'QJusUMQJZkOBXqiAGEnLpA.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '96ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0DcppYQAAAACUwpMeg+MyRLSfUm89I651UFJHMDFFREdFMDkxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:35:57 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/:issueAccessToken', {"scopes":["chat"]}) - .query(true) - .reply(200, {"token":"sanitized","expiresOn":"2021-10-16T18:35:58.1079676+00:00"}, [ - 'Content-Length', - '804', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'nIigxbi3ekCLqMrz/TbMAQ.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '99ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0DcppYQAAAAAuwYY+QGvMSLTxLv4Z7gBQUFJHMDFFREdFMDkxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:35:57 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_single_scope.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_single_scope.json new file mode 100644 index 000000000000..cba7bb4ff71a --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_gets_a_token_for_a_user_single_scope.json @@ -0,0 +1,76 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:06 GMT", + "MS-CV": "nP9sye4I\u002BU\u002BVW4Czl718Lw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0x/kuYgAAAADHJY4dI0JuSK57iTm0dwt6UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "36ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "19", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": { + "scopes": [ + "chat" + ] + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "69", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:06 GMT", + "MS-CV": "ta\u002BaACevVkWENfMLh7v1kA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0x/kuYgAAAAC8vZyubykdQbUyGQL/nY3PUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "31ms" + }, + "ResponseBody": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:07.5924476\u002B00:00" + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_revokes_tokens_issued_for_a_user.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_revokes_tokens_issued_for_a_user.js deleted file mode 100644 index b760bf8edfb3..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_revokes_tokens_issued_for_a_user.js +++ /dev/null @@ -1,163 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "b6315c3102987354fe49806f064f6b1b"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - NEULR2 ProdSlices', - 'Set-Cookie', - 'fpc=Aro1fQraqfFGs4VmokYTCbs; expires=Sun, 14-Nov-2021 18:36:01 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrsNTi_S9Cu9Sct07sWmw9MNKtF4NJYHgLId3PxkDeAGTMWn6x8ZRksp8JsXs3G9q7fzPhXaX0nYHmWwoMvwvOrLN3zv-5AsGvTwaeKh-gdEy7ZsOtuFd7JNMXGRexKwrlgpSed9LEgM3hSaWVlzUZvvV9uU1yuPPiibaJcyRHJtogAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:01 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - EUS ProdSlices', - 'Set-Cookie', - 'fpc=AiAKiM_imhJCiZCO8I3ewpQ; expires=Sun, 14-Nov-2021 18:36:01 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrM7xdLM9nvCXVbD1SK8wagbdjXBdEZ4ywz_nY0lA4jjtmTmn1ONBwienh98AOSY6ohWfmfck6NKtcrtg9XBPLRs7vzCcVJmnxfft09oTjBsua48AyDXucxRhWiT0chXMv5rzxxZCScJHaMmM3TB-SUl6CDYM6gz9F3sxZrnNaw10gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:01 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - SCUS ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AqVJc1ogWTJOiqUMgYnbkQ4o7iuqAQAAABHB-9gOAAAA; expires=Sun, 14-Nov-2021 18:36:01 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:01 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities', {"createTokenWithScopes":["chat","voip"]}) - .query(true) - .reply(201, {"identity":{"id":"sanitized"},"accessToken":{"token":"sanitized","expiresOn":"2021-10-16T18:36:02.6879164+00:00"}}, [ - 'Content-Length', - '927', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'hrHdEna4gkOpmGdAqtZQew.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '354ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0EcppYQAAAAACNmfkUfyCQquEHMAbkKBCUFJHMDFFREdFMDkxNwBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:02 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/:revokeAccessTokens') - .query(true) - .reply(204, "", [ - 'Request-Context', - 'appId=', - 'MS-CV', - 'BEWkTKBb0EuhaJQAFwF+vA.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '169ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0EsppYQAAAADRslrwAmrKR7lFS2TlY0EjUFJHMDFFREdFMDkxNwBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:02 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_revokes_tokens_issued_for_a_user.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_revokes_tokens_issued_for_a_user.json new file mode 100644 index 000000000000..233971ff2027 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad/recording_successfully_revokes_tokens_issued_for_a_user.json @@ -0,0 +1,75 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "41", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": { + "createTokenWithScopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "115", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:09 GMT", + "MS-CV": "T4ppMCdwTEaSXF4KvybOsA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0yfkuYgAAAABw2cSYBn1jQrGBKUdk60R3UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "35ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + }, + "accessToken": { + "token": "sanitized", + "expiresOn": "2022-03-15T08:16:09.8947783\u002B00:00" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Date": "Mon, 14 Mar 2022 08:16:09 GMT", + "MS-CV": "M4N00UTwWkW74gmRvyhjqg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0yfkuYgAAAAA67/C3MKO2Q4Jcc8M0L0FPUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "125ms" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.js deleted file mode 100644 index 9a93abad163f..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.js +++ /dev/null @@ -1,139 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "e0d54fbd05536534cfcffe5af630fbd6"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.11 - WEULR1 ProdSlices', - 'Set-Cookie', - 'fpc=AscReS5v5TZDnDIxaYUU4Vg; expires=Sun, 14-Nov-2021 18:36:08 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrPBKrK6GTDhgUqaxjiVwwz8E_6FM-hmK8jiZVBoqBt3uYZ0Lw96cOgmCOVJA4-dJKlDomAuotRVS21fFseuHcOkX4xYxEUV08hJ6RpQqwCls_CvNHgj2PdnzyAp1RgGzOzl5oGWvPCIS9gIqllFVTE0isUl-P8F0y1aJkEyvaHtcgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:08 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - SCUS ProdSlices', - 'Set-Cookie', - 'fpc=Alh9F01PNSJPthciorxvfT4; expires=Sun, 14-Nov-2021 18:36:08 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrVFlfMdYfgFfP1qO2Yx5r09c2drd1f4EhO0JskRuUJ3FRqvcnKoruLTGweQZpNBkhiPKyrb4DX-CB4knS_f1C3SzCLfvSSlBg3IXVXsEug4TgGVuoiuparbabEvK8sbu5aUakkwMiR_rc8VuZI6z6jPDhgd-0GD0SWGTsf-08evAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:08 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - NCUS ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Au2uHeSo-lhOnYNd8Vpp5QI; expires=Sun, 14-Nov-2021 18:36:08 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:08 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .delete('/identities/sanitized') - .query(true) - .reply(401, {"error":{"code":"IdentityNotOwned","message":"Provided identity doesn't belong to the resource."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - 'm4sZxu1xfEqs/1VDovN0DQ.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '14ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0GMppYQAAAABmgl7RplF+SLEznGs0tDJhUFJHMDFFREdFMDYwOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:07 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json new file mode 100644 index 000000000000..207a598e6a76 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json @@ -0,0 +1,38 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities/sanitized?api-version=2021-10-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:13 GMT", + "MS-CV": "Rp4gDQp3xk6Z8jKH/IpfCQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0zfkuYgAAAAD4ad48oebgRrytYizwDMlwUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "30ms" + }, + "ResponseBody": { + "error": { + "code": "IdentityNotOwned", + "message": "Provided identity doesn\u0027t belong to the resource." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.js deleted file mode 100644 index 965c29670572..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.js +++ /dev/null @@ -1,139 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "9ad7fc52c090de52384771f8693c7321"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.11 - NEULR2 ProdSlices', - 'Set-Cookie', - 'fpc=AlaQh-TgTUNLmKwR-G9aD7w; expires=Sun, 14-Nov-2021 18:36:06 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrsbTsyyGoe4O7KZSQYLC1J_0RlXB4YRmecTXZbQRDnnmN60Rd26bseRkd8C-GK7EEU9u_i-u1Phkzt7RZNvFDHz8eYGwGPL6fAdnnpgSUQz-J2qBPvSds00U2_QJLMuJoutGEWf1t9JGbN7_MD3M4rQZUgMmEGZWAjStRh6qEepcgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:06 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - EUS ProdSlices', - 'Set-Cookie', - 'fpc=AsN6_4VGS5BOriWMZQb3_s0; expires=Sun, 14-Nov-2021 18:36:06 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr7DRwFJffokAzlTLIu77b8SKoO_bFun_bH3dPwlg1LboszPo8ksAENvvufGjHYZC22zu8qPTfCyBXMvul07U1Mdgf_HfXLr4_v8xa9UWesY6ACxRkiL21Dmu5mbZ52p1Uk2vlR1UoKHh0DpobKue_Zwev98TmOKKGx4tGJ0Pj-t8gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:06 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - EUS ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Api_IIrEMSBLpyRF-r2d4T4o7iuqAQAAABbB-9gOAAAA; expires=Sun, 14-Nov-2021 18:36:06 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:06 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/:issueAccessToken', {"scopes":["chat","voip"]}) - .query(true) - .reply(401, {"error":{"code":"IdentityNotOwned","message":"Provided identity doesn't belong to the resource."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - 'GWaSN/lfr026HdNcvi3jkA.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '14ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0FsppYQAAAAAwzVanLPNuTKnzPmDJgsJyUFJHMDFFREdFMDYxNgBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:06 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json new file mode 100644 index 000000000000..7ef201eb2f9a --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json @@ -0,0 +1,45 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "26", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": { + "scopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 401, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:11 GMT", + "MS-CV": "CQDGOr1Ik0KusxXPlbaKWA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0zPkuYgAAAAD1eBXYKEj4R5l0thPbhmjwUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "20ms" + }, + "ResponseBody": { + "error": { + "code": "IdentityNotOwned", + "message": "Provided identity doesn\u0027t belong to the resource." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.js deleted file mode 100644 index 593bb869222b..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.js +++ /dev/null @@ -1,167 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "ed18ffc85a130ce448c3ca7906b2e304"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - WEULR2 ProdSlices', - 'Set-Cookie', - 'fpc=Ar1I_46B7bBCrRIt1smLDQI; expires=Sun, 14-Nov-2021 18:36:04 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrC-zBcsDowBGFQcmmtOpOJmjwO-uER4Rv7CPihKOl3aBcDafGxnCm9POmzunLWodODXlcgLyDsV0WCZ7nUzd7L7glHxHQ3W6St96zq2MDqIJNm0hBs1EETJ40Co3ot3ExToVzc44CsytoRo1un08ZBg546kwzbFH9Df-as5WHKaggAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:04 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - SCUS ProdSlices', - 'Set-Cookie', - 'fpc=AvKTJV1vfKdNkAwMseKXXh0; expires=Sun, 14-Nov-2021 18:36:04 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrVv1yBe1H2RL8wRn4ve8BS_JIUDPK3yc7Xnbpc3d-ZVbuTdLKxIIYbdxCcRfAcF8BG-_VftfMoEbk06bpMv0cW1DRLHGbYVWh7uyZ7HVCIsmu59dU7CphMS8iCoPBOfmgAu9GFlTiOSkK0Z78rwb1nVooG5RnnJ7YNMtBqujR7AggAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:04 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - EUS ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Aj6ialav5BtGngB44MFpzzco7iuqAQAAABTB-9gOAAAA; expires=Sun, 14-Nov-2021 18:36:05 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:05 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities') - .query(true) - .reply(201, {"identity":{"id":"sanitized"}}, [ - 'Content-Length', - '101', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'V48JT7IDJkOq9QOXFQAXmg.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '92ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0FcppYQAAAAA7+Z8NEPeFT53sa11HZFwFUFJHMDFFREdFMDkxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:06 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/:issueAccessToken', {"scopes":[]}) - .query(true) - .reply(400, {"error":{"code":"ValidationError","message":"Invalid scopes - Scopes field is required.","target":"scopes"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - 'cKgR2DWWEkW+g0oEYQGTdg.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '15ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0FsppYQAAAABH4UyGfSgtQZItM/ET3AjoUFJHMDFFREdFMDkxOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:06 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json new file mode 100644 index 000000000000..513aff6c4471 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json @@ -0,0 +1,77 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:11 GMT", + "MS-CV": "d8jl3wkLikO8tGZGb80Lmw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "0y/kuYgAAAAC/lWtg3CbJTrcWwINfYtBoUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "23ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "13", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": { + "scopes": [] + }, + "StatusCode": 400, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:11 GMT", + "MS-CV": "mU2y3rDxMEy5dfVL\u002Bmy5zw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0y/kuYgAAAAAhKxC8gbZBSKn\u002Bcu6ApSUXUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "18ms" + }, + "ResponseBody": { + "error": { + "code": "ValidationError", + "message": "Invalid scopes - Scopes field is required.", + "target": "scopes" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.js deleted file mode 100644 index 6e3a733e8e9a..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.js +++ /dev/null @@ -1,139 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "16e8e62cc2eaddf1998471037d2e2efd"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - NEULR1 ProdSlices', - 'Set-Cookie', - 'fpc=AnvcYsTrk1tPqwTnm4RrHxk; expires=Sun, 14-Nov-2021 18:36:07 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrYhg7-xFoZHQ2zGNhVz2gjceTr2mlZfi4CKXNRE8YCyxK91u7zkyfpU1RAn_doB6Z_cdRdMEUIjMA9lokI2GOOP6p9PkTBnyL-U4oakmw9bDVHF8nBxtfqp0PWBbVqR9OoK7IxEMyVHGOKJWXJ2pJ6UsqXUXoUrglIiivlpKY6LUgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:07 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.10 - NCUS ProdSlices', - 'Set-Cookie', - 'fpc=AhGuRiJjo2JIn60l-oOgKdU; expires=Sun, 14-Nov-2021 18:36:07 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrXrPaulKEsJhujXIQ5-x3av0CtmCu25kSYvmA9J6yfDAh620L85Edf1SBaVREkYASFG7tyDphfU7XJ7fJcH-WiqEJZA6qECpUuBzPsp3PDivqIFYmMKLNIwGH80U4YFKoqR3N5Qps-HF6FOQJ5c1Ez-EpRayF_cTX5DoL9LToJlggAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:07 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12108.11 - WUS2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Aqah7xm5uc5HlhHTcOjic_4; expires=Sun, 14-Nov-2021 18:36:07 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Fri, 15 Oct 2021 18:36:07 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/:revokeAccessTokens') - .query(true) - .reply(401, {"error":{"code":"IdentityNotOwned","message":"Provided identity doesn't belong to the resource."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - '0SuiFn2vi0GtKZ2LYdmqqQ.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '13ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0GMppYQAAAAAY0rry35TpRZq22R5uUlf1UFJHMDFFREdFMDcxOABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:07 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json new file mode 100644 index 000000000000..2314cfd44c0c --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_aad_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json @@ -0,0 +1,39 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:12 GMT", + "MS-CV": "KpWirZy24067Oz0YDefkyg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0zfkuYgAAAAC/O6La8dVYTYQRP0dHoLvCUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "41ms" + }, + "ResponseBody": { + "error": { + "code": "IdentityNotOwned", + "message": "Provided identity doesn\u0027t belong to the resource." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.js deleted file mode 100644 index 99b612d40864..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.js +++ /dev/null @@ -1,33 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "e0d54fbd05536534cfcffe5af630fbd6"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .delete('/identities/sanitized') - .query(true) - .reply(401, {"error":{"code":"IdentityNotOwned","message":"Provided identity doesn't belong to the resource."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - 'CNZ01mu5Yk2MpWgESNODTA.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '21ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0IMppYQAAAACX8dfqkHX9TJUjtA9pGeZgUFJHMDFFREdFMDYxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:16 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json new file mode 100644 index 000000000000..9eca2ab201bb --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_delete_an_invalid_user.json @@ -0,0 +1,40 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities/sanitized?api-version=2021-10-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:15 GMT" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:17 GMT", + "MS-CV": "ghI2GKE38U6SP0zLj1aIzg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "00fkuYgAAAACfKpi/4UQnQ7pRQjLBiSRhUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "26ms" + }, + "ResponseBody": { + "error": { + "code": "IdentityNotOwned", + "message": "Provided identity doesn\u0027t belong to the resource." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.js deleted file mode 100644 index 2483ee801ad5..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.js +++ /dev/null @@ -1,33 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "9ad7fc52c090de52384771f8693c7321"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/:issueAccessToken', {"scopes":["chat","voip"]}) - .query(true) - .reply(401, {"error":{"code":"IdentityNotOwned","message":"Provided identity doesn't belong to the resource."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - 'vUl4FGku4EqxhS89/0xumQ.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '20ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0H8ppYQAAAABaLRMaOAmuQZU0lU1KoB7MUFJHMDFFREdFMDYwOQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:15 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json new file mode 100644 index 000000000000..9194c7fad107 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_for_an_invalid_user.json @@ -0,0 +1,47 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "26", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "EqW/vFkRi/EMVlRLG6\u002Bkt0X27SowO7NytIh/miHOZlY=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:14 GMT" + }, + "RequestBody": { + "scopes": [ + "chat", + "voip" + ] + }, + "StatusCode": 401, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:16 GMT", + "MS-CV": "9cEK/vwioUeDNK0IXMqJLw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "00fkuYgAAAAAnAAzwyVDzSqKsXkvf4iwLUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "20ms" + }, + "ResponseBody": { + "error": { + "code": "IdentityNotOwned", + "message": "Provided identity doesn\u0027t belong to the resource." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.js deleted file mode 100644 index 521be436b740..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.js +++ /dev/null @@ -1,61 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "ed18ffc85a130ce448c3ca7906b2e304"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities') - .query(true) - .reply(201, {"identity":{"id":"sanitized"}}, [ - 'Content-Length', - '101', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'Lmoqw4N2L0C5y/fRKV27dA.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '97ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0HsppYQAAAAAcD84rNtexSr751iMGaGy0UFJHMDFFREdFMDcxMgBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:14 GMT' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/:issueAccessToken', {"scopes":[]}) - .query(true) - .reply(400, {"error":{"code":"ValidationError","message":"Invalid scopes - Scopes field is required.","target":"scopes"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - 'B1N9O1fQLEy2MtAT0qgS0Q.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '17ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0HsppYQAAAAAgxhqw27tzSbzXH4EgQb0VUFJHMDFFREdFMDcxMgBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:14 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json new file mode 100644 index 000000000000..a16923c4e8d1 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_issue_a_token_without_any_scopes.json @@ -0,0 +1,81 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:14 GMT" + }, + "RequestBody": null, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Length": "31", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:16 GMT", + "MS-CV": "xS1ZA8w1EESqf/FiS37ZTA.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "00fkuYgAAAACddTVFDbraTL/D8TyXhRDcUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "33ms" + }, + "ResponseBody": { + "identity": { + "id": "sanitized" + } + } + }, + { + "RequestUri": "https://endpoint/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "13", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "60\u002BXGy/KS72mYCMozQDW1tzfkFvdp5Qzbvub34UOQ5s=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:14 GMT" + }, + "RequestBody": { + "scopes": [] + }, + "StatusCode": 400, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:16 GMT", + "MS-CV": "T5zCf8bt4Uu3ldA7T9BiTg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "00fkuYgAAAAAbcDxqZbgAS5fKK/R\u002BCDDSUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "19ms" + }, + "ResponseBody": { + "error": { + "code": "ValidationError", + "message": "Invalid scopes - Scopes field is required.", + "target": "scopes" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.js b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.js deleted file mode 100644 index 6ba02f97c7d9..000000000000 --- a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.js +++ /dev/null @@ -1,33 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "16e8e62cc2eaddf1998471037d2e2efd"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/identities/sanitized/:revokeAccessTokens') - .query(true) - .reply(401, {"error":{"code":"IdentityNotOwned","message":"Provided identity doesn't belong to the resource."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - 'Vkrtghw+EE6LohHujNaK1w.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - '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', - '21ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0H8ppYQAAAAAqH8a4kcs5TpAntfNAx3jEUFJHMDFFREdFMDkwNwBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Fri, 15 Oct 2021 18:36:15 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json new file mode 100644 index 000000000000..4d27af2503b7 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/communicationidentityclient_playbacklive_error_cases_/recording_throws_an_error_when_attempting_to_revoke_a_token_from_an_invalid_user.json @@ -0,0 +1,41 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:14 GMT" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "api-supported-versions": "2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, 2021-10-31-preview, 2021-11-01, 2022-06-01", + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:17 GMT", + "MS-CV": "y\u002BoJ8Syg0kqhnaETAqWY2Q.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "00fkuYgAAAABeJil5tprqRYyJqrdEXimbUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "21ms" + }, + "ResponseBody": { + "error": { + "code": "IdentityNotOwned", + "message": "Provided identity doesn\u0027t belong to the resource." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_successfully_exchanges_a_teams_user_aad_token_for_a_communication_access_token.js b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_successfully_exchanges_a_teams_user_aad_token_for_a_communication_access_token.js deleted file mode 100644 index eb2668e343a7..000000000000 --- a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_successfully_exchanges_a_teams_user_aad_token_for_a_communication_access_token.js +++ /dev/null @@ -1,139 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "c5f66726f0c736e2fbc272f2f87879bd"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12171.14 - NEULR1 ProdSlices', - 'Set-Cookie', - 'fpc=AltTCh2f8jRIisDaEHb5yWg; expires=Thu, 25-Nov-2021 23:13:09 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr0MU6fwfhvo7a2J-UzfL8o1PzzxzjaNi2O-aQlxDrIrftNYl2F1Y7BZ4Dq5GtAeEwjj12Ff5hy8srJgk1SzM-R_nLEVUxfAl7nP_lI43iS7fXRIDNSj1qSWjhdV8aL5Dn3xekN60Z_LIu6xFB0I_GGrQnYsfmW1C3K_JFkxIeGuogAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:09 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/kerberos","tenant_region_scope":"EU","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - WEULR2 ProdSlices', - 'Set-Cookie', - 'fpc=Aobr8SgTRQhMuXTKb1v5E24; expires=Thu, 25-Nov-2021 23:13:09 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrVQ0NzCvltcmcpKLtrQygupEdWKYRcJpB1G4MHzlMauR66KdVFlEvTtrUqP62DoeH1audYz8lhbL16BFGxx6oPCGAvODJhJFXL_b62Wg87WCQLWY86DRDPftvR28DkzlPO_R2psezd-ae7m6r18Cd1mSdZnQRJn60VOgNvHH6jEcgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:09 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token', "client_id=00000000-0000-0000-0000-000000000000&username=MSALUsername&password=MSALPassword&scope=M365Scope%20openid%20profile%20offline_access&grant_type=password&client_info=1&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|371,0,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","scope":"https://auth.msft.communication.azure.com/VoIP M365Scope","expires_in":3599,"ext_expires_in":3599,"access_token":"sanitized","refresh_token":"sanitized","id_token":"sanitized","client_info":"eyJ1aWQiOiI4MWU3OGNhOC1hZGU1LTQ5OTgtOWMwNS0xZTE3Zjg1MGZjZmUiLCJ1dGlkIjoiYmVmM2ZkY2ItZGNjYi00MWE5LWFlNzktNjQ4ZjIyYTMyZDIyIn0"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - NEULR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=ApIVoR-yrd1NodDcmEPvZiW4k9TnAQAAAIWCCtkOAAAA; expires=Thu, 25-Nov-2021 23:13:09 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:09 GMT', - 'Content-Length', - '4545' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/teamsUser/:exchangeAccessToken', {"token":"sanitized"}) - .query(true) - .reply(200, {"token":"sanitized","expiresOn":"2021-10-27T00:13:08.9147164+00:00"}, [ - 'Content-Length', - '818', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'RVs0N8eewEGR9te2/mbeLw.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - 'api-supported-versions', - '2021-03-31-preview1, 2021-10-31-preview', - 'X-Processing-Time', - '415ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0hYt4YQAAAAB2MnUC/nhsR4TkTeey6ctSUFJHMDFFREdFMDYxMABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Tue, 26 Oct 2021 23:13:10 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_successfully_exchanges_a_teams_user_aad_token_for_a_communication_access_token.json b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_successfully_exchanges_a_teams_user_aad_token_for_a_communication_access_token.json new file mode 100644 index 000000000000..bb6e60bdcc59 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_successfully_exchanges_a_teams_user_aad_token_for_a_communication_access_token.json @@ -0,0 +1,42 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "21", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "Ah\u002BAYsTYCxDlGxtDLuIPje1sj3b77sESFS9DrvUpEg4=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:19 GMT" + }, + "RequestBody": { + "token": "sanitized" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-03-31-preview1, 2021-10-31-preview, 2022-06-01", + "Content-Length": "69", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:22 GMT", + "MS-CV": "qpT13E7cG0OwbFoltUedaQ.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "01vkuYgAAAABjqhnaJi7OSaF4wtdYNf2kUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "404ms" + }, + "ResponseBody": { + "token": "sanitized", + "expiresOn": "2022-03-14T09:24:39.7710282\u002B00:00" + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_empty_teams_user_aad_token.js b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_empty_teams_user_aad_token.js deleted file mode 100644 index 1023e9102b31..000000000000 --- a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_empty_teams_user_aad_token.js +++ /dev/null @@ -1,31 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "b1f4170b74dcc0b449f5079440989357"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/teamsUser/:exchangeAccessToken', {"token":"sanitized"}) - .query(true) - .reply(401, {"error":{"code":"InvalidAccessToken","message":"Provided access token is not valid."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - 'Zaoy9VDEL0W6xx5b9F/WJw.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - 'X-Processing-Time', - '19ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0h4t4YQAAAAAK1c8zMjSeRrzKB4I5r/7XUFJHMDFFREdFMDkxMwBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Tue, 26 Oct 2021 23:13:11 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_empty_teams_user_aad_token.json b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_empty_teams_user_aad_token.json new file mode 100644 index 000000000000..d390d3264c18 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_empty_teams_user_aad_token.json @@ -0,0 +1,43 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "21", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "57hhXfjFJ4reUHSXuwlHWm62DSRXMo4VffVX4YLJJbc=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:19 GMT" + }, + "RequestBody": { + "token": "sanitized" + }, + "StatusCode": 401, + "ResponseHeaders": { + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:22 GMT", + "MS-CV": "8T9qtwOesUORxLYupBTrxw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "01vkuYgAAAAAID\u002BwdZWcxQ5fl0OR5u6FPUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "19ms" + }, + "ResponseBody": { + "error": { + "code": "InvalidAccessToken", + "message": "Provided access token is not valid." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_expired_teams_user_aad_token.js b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_expired_teams_user_aad_token.js deleted file mode 100644 index f486a33be1fc..000000000000 --- a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_expired_teams_user_aad_token.js +++ /dev/null @@ -1,31 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "65c32ed61371c7d9b98a6921173cf0fd"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/teamsUser/:exchangeAccessToken', {"token":"sanitized"}) - .query(true) - .reply(401, {"error":{"code":"InvalidAccessToken","message":"Provided access token is not valid."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - '6Y78qoVe+UmqyBHZsTCo4A.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - 'X-Processing-Time', - '28ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0iIt4YQAAAABRVqd1kOPHQ55BahalPjTTUFJHMDFFREdFMDYxMgBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Tue, 26 Oct 2021 23:13:13 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_expired_teams_user_aad_token.json b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_expired_teams_user_aad_token.json new file mode 100644 index 000000000000..fb1f79f6260b --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_expired_teams_user_aad_token.json @@ -0,0 +1,43 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "21", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "H\u002BnYqfONMXXInH6CfRlv35rj5DRwtW5rY88/o2Yx4GE=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:20 GMT" + }, + "RequestBody": { + "token": "sanitized" + }, + "StatusCode": 401, + "ResponseHeaders": { + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:22 GMT", + "MS-CV": "FaQt3aOM7E6RYS0BLqpbCw.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "01/kuYgAAAAC7Y39t3FXHSYaWtg9v3RemUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "36ms" + }, + "ResponseBody": { + "error": { + "code": "InvalidAccessToken", + "message": "Provided access token is not valid." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_invalid_teams_user_aad_token.js b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_invalid_teams_user_aad_token.js deleted file mode 100644 index af26552a06b9..000000000000 --- a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_invalid_teams_user_aad_token.js +++ /dev/null @@ -1,31 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "c9d136c192e3bff9eb77825206db2097"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/teamsUser/:exchangeAccessToken', {"token":"sanitized"}) - .query(true) - .reply(401, {"error":{"code":"InvalidAccessToken","message":"Provided access token is not valid."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - 'hSZn3Mr020efqwfjiwyStQ.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - 'X-Processing-Time', - '21ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0h4t4YQAAAAB7QD9p7gocQqQr6FLyO3GyUFJHMDFFREdFMDYxOABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Tue, 26 Oct 2021 23:13:12 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_invalid_teams_user_aad_token.json b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_invalid_teams_user_aad_token.json new file mode 100644 index 000000000000..113b1d59ef7d --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive/recording_throws_an_error_when_attempting_to_exchange_an_invalid_teams_user_aad_token.json @@ -0,0 +1,43 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "21", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized", + "x-ms-content-sha256": "gtdDY7ecMyK\u002BwVq9aXDSvKuc5BiebgjLBB3AqaEwP0k=", + "x-ms-date": "Mon, 14 Mar 2022 08:16:20 GMT" + }, + "RequestBody": { + "token": "sanitized" + }, + "StatusCode": 401, + "ResponseHeaders": { + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:22 GMT", + "MS-CV": "AJP6Q8vVcUi8Z8JRXevZdg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "01/kuYgAAAADcE4Wvu7EHRLeEQ\u002BP5JLWuUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "18ms" + }, + "ResponseBody": { + "error": { + "code": "InvalidAccessToken", + "message": "Provided access token is not valid." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_successfully_exchanges_a_teams_user_aad_token_for_a_communication_access_token.js b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_successfully_exchanges_a_teams_user_aad_token_for_a_communication_access_token.js deleted file mode 100644 index 0b462bcdc559..000000000000 --- a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_successfully_exchanges_a_teams_user_aad_token_for_a_communication_access_token.js +++ /dev/null @@ -1,245 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "c5f66726f0c736e2fbc272f2f87879bd"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12171.14 - NEULR2 ProdSlices', - 'Set-Cookie', - 'fpc=AuYIRLRjK75Dk5NPom_bLyM; expires=Thu, 25-Nov-2021 23:13:05 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr_2-y3d0Wiu-nCAnovnyjDeeHZ_1YXLqDucNof-RFKJ5MLVtP9qyYKSYZc5oBnzeuV2gIlJx5VMVFQ78yMPMWMinFydjoj2qsFbYOVh207HjRPfr2RpvyRIU74ot4RvwzM8-BD8l4VhmfKEA98dDo0CZrxpJMPf1bSwbVru2NKC8gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:04 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/00000000-0000-0000-0000-000000000000/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/kerberos","tenant_region_scope":"EU","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - NEULR1 ProdSlices', - 'Set-Cookie', - 'fpc=Ahg9eelgr-1PmVxVhjFSKD4; expires=Thu, 25-Nov-2021 23:13:05 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrBtc6sDSnX0S2FIe8xeQQtp3zgYs136sr0rXxgsYt8eUK4tZEm5NfBPy1aAGhmiqRqCK2pbzO0ogbwhmboLJLNzj_fFix7_PCh2JgkzPcMZyhBUM8RqehsAxQqMFwYBevbxgj7HiGHZK0zy9B_Vm_xxbiAXpmB2_muLf1qwAVumMgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:05 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/00000000-0000-0000-0000-000000000000/oauth2/v2.0/token', "client_id=00000000-0000-0000-0000-000000000000&username=MSALUsername&password=MSALPassword&scope=M365Scope%20openid%20profile%20offline_access&grant_type=password&client_info=1&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|371,0,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","scope":"https://auth.msft.communication.azure.com/VoIP M365Scope","expires_in":3599,"ext_expires_in":3599,"access_token":"sanitized","refresh_token":"sanitized","id_token":"sanitized","client_info":"eyJ1aWQiOiI4MWU3OGNhOC1hZGU1LTQ5OTgtOWMwNS0xZTE3Zjg1MGZjZmUiLCJ1dGlkIjoiYmVmM2ZkY2ItZGNjYi00MWE5LWFlNzktNjQ4ZjIyYTMyZDIyIn0"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - NEULR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Aq7d8S0K1M5BttbT2eQZmdy4k9TnAQAAAICCCtkOAAAA; expires=Thu, 25-Nov-2021 23:13:05 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:05 GMT', - 'Content-Length', - '4545' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12171.14 - WEULR1 ProdSlices', - 'Set-Cookie', - 'fpc=AnqTvyR0uRBOuE8iwecXHnk; expires=Thu, 25-Nov-2021 23:13:05 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr7XKRreYPDTGKqMe1dm530gPiVWCV0HljLrtvfKuk_3gYfGacd4cDykvWdotDDQbBYkKaIoHQpOn3nRTxSzJ5Zj_g3h96X0W-NCSYYYCtUEN4I2EcD2v06nHFQBj2kkpfYKBMVagNhHgoJyrnj5FBxXqTRLbHaJFVsViQGHg8VKwgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:05 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - EUS ProdSlices', - 'Set-Cookie', - 'fpc=AqNzJI-hO41Mtd61ppSnvI4; expires=Thu, 25-Nov-2021 23:13:05 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrUK91GFKKiXI48h-Q_a0-_Qf0gzZgtyF_HH_rvRUI-Vf6ljVnCyXEE76QtDhWKf9n-wAHQpABIeGzQ2llhmzlB4DFgPuO44L9z1rleJkcUn5uPEjAdVM2wcTVCXcD3IIHytCqn-JR2lmCzrwXwOafY0a0JmSx3SsvnoOBfhaHESYgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:05 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - NCUS ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AhJC2x1be6FAmePADOu7cIUo7iuqAQAAAIGCCtkOAAAA; expires=Thu, 25-Nov-2021 23:13:05 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:05 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/teamsUser/:exchangeAccessToken', {"token":"sanitized"}) - .query(true) - .reply(200, {"token":"sanitized","expiresOn":"2021-10-27T00:13:04.2643655+00:00"}, [ - 'Content-Length', - '818', - 'Content-Type', - 'application/json; charset=utf-8', - 'Request-Context', - 'appId=', - 'MS-CV', - 'Soiiz7NRwku4XRKlxspEQA.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - 'api-supported-versions', - '2021-03-31-preview1, 2021-10-31-preview', - 'X-Processing-Time', - '354ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0gYt4YQAAAACp1omZAyngQZvZwMa4CaDbUFJHMDFFREdFMDkxNABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Tue, 26 Oct 2021 23:13:06 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_successfully_exchanges_a_teams_user_aad_token_for_a_communication_access_token.json b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_successfully_exchanges_a_teams_user_aad_token_for_a_communication_access_token.json new file mode 100644 index 000000000000..c86b25b6ef13 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_successfully_exchanges_a_teams_user_aad_token_for_a_communication_access_token.json @@ -0,0 +1,40 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "21", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": { + "token": "sanitized" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-03-31-preview1, 2021-10-31-preview, 2022-06-01", + "Content-Length": "69", + "Content-Type": "application/json; charset=utf-8", + "Date": "Mon, 14 Mar 2022 08:16:18 GMT", + "MS-CV": "gih2b78lQkSw/qV3Mm0N1w.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "X-Azure-Ref": "00/kuYgAAAACZHhANIQtESLCIctob4U97UFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "457ms" + }, + "ResponseBody": { + "token": "sanitized", + "expiresOn": "2022-03-14T09:40:34.5512479\u002B00:00" + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_empty_teams_user_aad_token.js b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_empty_teams_user_aad_token.js deleted file mode 100644 index 66415e223cc1..000000000000 --- a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_empty_teams_user_aad_token.js +++ /dev/null @@ -1,137 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "b1f4170b74dcc0b449f5079440989357"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12171.14 - WEULR1 ProdSlices', - 'Set-Cookie', - 'fpc=AhuxiOdnXPpPiRbtOGK70DI; expires=Thu, 25-Nov-2021 23:13:06 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrDLQikWUXenO2H527pXNKgj_mf8ev9MwvduyicBsdZ_SRV4uoIzboqQsH_-5IiXA9T4j8z4Hc3JrW4k_pWSzKDzR3dLyp0vOjpRKjbRSxOhNfhMoBgXhhUOGq1-0eLySgIo8BvqADl4Lm5KIFOoppbIhN5Frz7ZffCnNszEc-e2QgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:06 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - EUS ProdSlices', - 'Set-Cookie', - 'fpc=Ahd0vZ0it6lPtJMF1qtRbmw; expires=Thu, 25-Nov-2021 23:13:06 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrQMLG_8XU6LI5gm9naCm_3papDjKBokEV8nIZ9QVPwoexx93GHSxsjveSUfIbWQSuzPdmajCvYMnntAhIqRzw5gpOLqkDonpxOw6GQzrw2RAHhH9vxBBWv735Eu7toS8OPjxECOtljnnELFxk-ao7MhE1gf5SBNffj66XVdDiAeggAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:06 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - SCUS ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Anqve43BF-tFjO5X2bWEn34o7iuqAQAAAIKCCtkOAAAA; expires=Thu, 25-Nov-2021 23:13:06 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:06 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/teamsUser/:exchangeAccessToken', {"token":"sanitized"}) - .query(true) - .reply(401, {"error":{"code":"InvalidAccessToken","message":"Provided access token is not valid."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - 'pxNXxo2kikaduylZ4G+2qQ.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - 'X-Processing-Time', - '18ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0got4YQAAAACkvGUq/SRAQYttGlsij4BCUFJHMDFFREdFMDYxMwBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Tue, 26 Oct 2021 23:13:07 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_empty_teams_user_aad_token.json b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_empty_teams_user_aad_token.json new file mode 100644 index 000000000000..198a790755be --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_empty_teams_user_aad_token.json @@ -0,0 +1,41 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "21", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": { + "token": "sanitized" + }, + "StatusCode": 401, + "ResponseHeaders": { + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:19 GMT", + "MS-CV": "daAljhlwTUaPE7hi\u002BMle4Q.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "01PkuYgAAAACUhzdXlCoAQKrKiOVE0XbdUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "16ms" + }, + "ResponseBody": { + "error": { + "code": "InvalidAccessToken", + "message": "Provided access token is not valid." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_expired_teams_user_aad_token.js b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_expired_teams_user_aad_token.js deleted file mode 100644 index 1a0db50c7643..000000000000 --- a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_expired_teams_user_aad_token.js +++ /dev/null @@ -1,137 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "65c32ed61371c7d9b98a6921173cf0fd"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - NEULR1 ProdSlices', - 'Set-Cookie', - 'fpc=Atd-1cpV70tPj65VvoMrDDg; expires=Thu, 25-Nov-2021 23:13:08 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrv1N95rsmbv1bmEQq5c-aVuPx4Uw98_gDHMdgPHRXl9cC21ZzzFxYliTvMzpCWO3RR9Y2PVipipGaH5WdxFqVeQSzd8ajjYUXb3ROWiV8ZTuzZa_8OhO7Bce_YJXGfwDhHaQDQt38gg9yxHprI7P69S3W0G3tfTTgTMtgnXwdG0ogAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:08 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - WUS2 ProdSlices', - 'Set-Cookie', - 'fpc=AouZIdHpr3ROp-AVBwiZS7U; expires=Thu, 25-Nov-2021 23:13:08 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrZHbTgdxggO60ii2KQ99KvwQ0DVMlsAIqHnh6ACcWlMZF3eGgZEBkeS3A9uwGzD1TM1C7yQzjTyyf55HNtVgiyv5n20TUQYqgpFKElncTojQwVs00Lq-L8OnuFwOXIg3T785ExmbLn3t60MU2iSjXnU6U-jjEkTeAfhZDnK8C1oAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:08 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - EUS ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Ao5_mBTJ2PVHlNsYN6TPr4o; expires=Thu, 25-Nov-2021 23:13:08 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:08 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/teamsUser/:exchangeAccessToken', {"token":"sanitized"}) - .query(true) - .reply(401, {"error":{"code":"InvalidAccessToken","message":"Provided access token is not valid."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - 'nz04AyKn3kGOKRu6vm9doQ.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - 'X-Processing-Time', - '25ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0hIt4YQAAAABZomyKhEkoRKCZe/khmGFDUFJHMDFFREdFMDYyMQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Tue, 26 Oct 2021 23:13:08 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_expired_teams_user_aad_token.json b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_expired_teams_user_aad_token.json new file mode 100644 index 000000000000..e6e7a28113ac --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_expired_teams_user_aad_token.json @@ -0,0 +1,41 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "21", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": { + "token": "sanitized" + }, + "StatusCode": 401, + "ResponseHeaders": { + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:20 GMT", + "MS-CV": "tuzZEc0nU0qfBI\u002BKIbFS9g.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "01fkuYgAAAABWs9zozi1XRpOfLLt4WzhmUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "28ms" + }, + "ResponseBody": { + "error": { + "code": "InvalidAccessToken", + "message": "Provided access token is not valid." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_invalid_teams_user_aad_token.js b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_invalid_teams_user_aad_token.js deleted file mode 100644 index 2504929b8c5e..000000000000 --- a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_invalid_teams_user_aad_token.js +++ /dev/null @@ -1,137 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "c9d136c192e3bff9eb77825206db2097"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/SomeTenantId/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12171.14 - NEULR1 ProdSlices', - 'Set-Cookie', - 'fpc=AsGuutZBmQpJtK1GFnir-ZY; expires=Thu, 25-Nov-2021 23:13:07 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrWonXmWSiusyoxkSFxawC7JDlbR0DU-AhmEiy-Y7YDFAysYxqw5cxNdJXiORSUmVAiMW0OkqgEPjf3S3FSFuZrOMQM4w3fL9P9qDiS2Xc-7Jfvs437tlrsFnAsbXNJ-gXnwU8Cn2tGrfW9pZk3r9OYWtoDornzjmWHf0hxx24sgsgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:07 GMT', - 'Content-Length', - '980' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .get('/SomeTenantId/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/SomeTenantId/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/SomeTenantId/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/SomeTenantId/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/SomeTenantId/kerberos","tenant_region_scope":"NA","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - WUS2 ProdSlices', - 'Set-Cookie', - 'fpc=Ao-_558Nv0tNmIPuQnGq8D0; expires=Thu, 25-Nov-2021 23:13:07 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrFJltYj1ZLoDvD4zqxvBeKNJzuGoVwlUKJdF_hYc2Je_KCAfVM-uPbE70Is7dxfLtOHEpz4QrETGw47voDWoEXQdXNH8127VEcXtmL13q5F1d3i7XzpHChYMU-2UXrRkBNZ-ywiNIrjKClhdnxvrRPMoZBZKNqHS8ptzRilLgg-UgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:07 GMT', - 'Content-Length', - '1753' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/SomeTenantId/oauth2/v2.0/token', "client_id=SomeClientId&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.3.2&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=00000000-0000-0000-0000-000000000000&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22CP1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"sanitized"}, [ - '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', - '00000000-0000-0000-0000-000000000000', - 'x-ms-ests-server', - '2.1.12158.6 - NCUS ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AuogNIqlGvBGjfN_m71B6PMo7iuqAQAAAIOCCtkOAAAA; expires=Thu, 25-Nov-2021 23:13:07 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 26 Oct 2021 23:13:07 GMT', - 'Content-Length', - '1327' -]); - -nock('https://endpoint', {"encodedQueryParams":true}) - .post('/teamsUser/:exchangeAccessToken', {"token":"sanitized"}) - .query(true) - .reply(401, {"error":{"code":"InvalidAccessToken","message":"Provided access token is not valid."}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Request-Context', - 'appId=', - 'MS-CV', - 'Zl82Aj0ZJEe/10Jyss9iBw.0', - 'Strict-Transport-Security', - 'max-age=2592000', - 'x-ms-client-request-id', - '00000000-0000-0000-0000-000000000000', - 'X-Processing-Time', - '15ms', - 'X-Cache', - 'CONFIG_NOCACHE', - 'X-Azure-Ref', - '0hIt4YQAAAABKgWn0VYM6Sr/YErpFUaBQUFJHMDFFREdFMDYwOABmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=', - 'Date', - 'Tue, 26 Oct 2021 23:13:07 GMT' -]); diff --git a/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_invalid_teams_user_aad_token.json b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_invalid_teams_user_aad_token.json new file mode 100644 index 000000000000..6856043d4613 --- /dev/null +++ b/sdk/communication/communication-identity/recordings/node/get_token_for_teams_user_playbacklive_aad/recording_throws_an_error_when_attempting_to_exchange_an_invalid_teams_user_aad_token.json @@ -0,0 +1,41 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "21", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-communication-identity/1.1.0-beta.2 core-rest-pipeline/1.5.1 Node/v12.22.10 OS/(x64-Windows_NT-10.0.22000)", + "x-ms-client-request-id": "sanitized" + }, + "RequestBody": { + "token": "sanitized" + }, + "StatusCode": 401, + "ResponseHeaders": { + "Content-Type": "application/json", + "Date": "Mon, 14 Mar 2022 08:16:20 GMT", + "MS-CV": "6BkOmFIIwka2IRyWYktdCg.0", + "Request-Context": "appId=", + "Strict-Transport-Security": "max-age=2592000", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "01PkuYgAAAAAbxOEQBkexT7sm0ICoi\u002BCfUFJHMDFFREdFMDcxNQBmMDlhNGMxMy0yMWYxLTQ4ZWMtOWNmNy02NjU0NTY4NGI2NDI=", + "X-Cache": "CONFIG_NOCACHE", + "x-ms-client-request-id": "sanitized", + "X-Processing-Time": "24ms" + }, + "ResponseBody": { + "error": { + "code": "InvalidAccessToken", + "message": "Provided access token is not valid." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/communication/communication-identity/review/communication-identity.api.md b/sdk/communication/communication-identity/review/communication-identity.api.md index 7f694e3907c2..562477e9169e 100644 --- a/sdk/communication/communication-identity/review/communication-identity.api.md +++ b/sdk/communication/communication-identity/review/communication-identity.api.md @@ -4,10 +4,10 @@ ```ts +import { CommonClientOptions } from '@azure/core-client'; import { CommunicationUserIdentifier } from '@azure/communication-common'; import { KeyCredential } from '@azure/core-auth'; -import { OperationOptions } from '@azure/core-http'; -import { PipelineOptions } from '@azure/core-http'; +import { OperationOptions } from '@azure/core-client'; import { TokenCredential } from '@azure/core-auth'; // @public @@ -30,7 +30,7 @@ export class CommunicationIdentityClient { } // @public -export interface CommunicationIdentityClientOptions extends PipelineOptions { +export interface CommunicationIdentityClientOptions extends CommonClientOptions { } // @public diff --git a/sdk/communication/communication-identity/src/communicationIdentityClient.ts b/sdk/communication/communication-identity/src/communicationIdentityClient.ts index 8f4478c82634..2725239fcc8c 100644 --- a/sdk/communication/communication-identity/src/communicationIdentityClient.ts +++ b/sdk/communication/communication-identity/src/communicationIdentityClient.ts @@ -2,29 +2,23 @@ // Licensed under the MIT license. import { + CommunicationAccessToken, + CommunicationIdentityClientOptions, + CommunicationUserToken, + TokenScope, +} from "./models"; +import { + CommunicationUserIdentifier, createCommunicationAuthPolicy, - parseClientArguments, isKeyCredential, - CommunicationUserIdentifier, + parseClientArguments, } from "@azure/communication-common"; -import { isTokenCredential, KeyCredential, TokenCredential } from "@azure/core-auth"; -import { - InternalPipelineOptions, - createPipelineFromOptions, - OperationOptions, - operationOptionsToRequestOptionsBase, -} from "@azure/core-http"; +import { InternalClientPipelineOptions, OperationOptions } from "@azure/core-client"; +import { KeyCredential, TokenCredential, isTokenCredential } from "@azure/core-auth"; +import { IdentityRestClient } from "./generated/src/identityRestClient"; import { SpanStatusCode } from "@azure/core-tracing"; -import { CommunicationIdentity, IdentityRestClient } from "./generated/src/identityRestClient"; -import { SDK_VERSION } from "./constants"; -import { logger } from "./common/logger"; import { createSpan } from "./common/tracing"; -import { - CommunicationIdentityClientOptions, - TokenScope, - CommunicationUserToken, - CommunicationAccessToken, -} from "./models"; +import { logger } from "./common/logger"; const isCommunicationIdentityClientOptions = ( options: any @@ -38,7 +32,7 @@ export class CommunicationIdentityClient { /** * A reference to the auto-generated UserToken HTTP client. */ - private readonly client: CommunicationIdentity; + private readonly client: IdentityRestClient; /** * Initializes a new instance of the CommunicationIdentity class. @@ -83,19 +77,8 @@ export class CommunicationIdentityClient { const options = isCommunicationIdentityClientOptions(credentialOrOptions) ? credentialOrOptions : maybeOptions; - const libInfo = `azsdk-js-communication-identity/${SDK_VERSION}`; - - if (!options.userAgentOptions) { - options.userAgentOptions = {}; - } - if (options.userAgentOptions.userAgentPrefix) { - options.userAgentOptions.userAgentPrefix = `${options.userAgentOptions.userAgentPrefix} ${libInfo}`; - } else { - options.userAgentOptions.userAgentPrefix = libInfo; - } - - const internalPipelineOptions: InternalPipelineOptions = { + const internalPipelineOptions: InternalClientPipelineOptions = { ...options, ...{ loggingOptions: { @@ -104,9 +87,10 @@ export class CommunicationIdentityClient { }, }; + this.client = new IdentityRestClient(url, { endpoint: url, ...internalPipelineOptions }); + const authPolicy = createCommunicationAuthPolicy(credential); - const pipeline = createPipelineFromOptions(internalPipelineOptions, authPolicy); - this.client = new IdentityRestClient(url, pipeline).communicationIdentity; + this.client.pipeline.addPolicy(authPolicy); } /** @@ -123,12 +107,11 @@ export class CommunicationIdentityClient { ): Promise { const { span, updatedOptions } = createSpan("CommunicationIdentity-issueToken", options); try { - const { _response, ...result } = await this.client.issueAccessToken( + return await this.client.communicationIdentityOperations.issueAccessToken( user.communicationUserId, - { scopes }, - operationOptionsToRequestOptionsBase(updatedOptions) + scopes, + updatedOptions ); - return result; } catch (e) { span.setStatus({ code: SpanStatusCode.ERROR, @@ -152,9 +135,9 @@ export class CommunicationIdentityClient { ): Promise { const { span, updatedOptions } = createSpan("CommunicationIdentity-revokeTokens", options); try { - await this.client.revokeAccessTokens( + await this.client.communicationIdentityOperations.revokeAccessTokens( user.communicationUserId, - operationOptionsToRequestOptionsBase(updatedOptions) + updatedOptions ); } catch (e) { span.setStatus({ @@ -175,7 +158,7 @@ export class CommunicationIdentityClient { public async createUser(options: OperationOptions = {}): Promise { const { span, updatedOptions } = createSpan("CommunicationIdentity-createUser", options); try { - const result = await this.client.create(operationOptionsToRequestOptionsBase(updatedOptions)); + const result = await this.client.communicationIdentityOperations.create(updatedOptions); return { communicationUserId: result.identity.id, }; @@ -205,9 +188,9 @@ export class CommunicationIdentityClient { options ); try { - const { identity, accessToken } = await this.client.create({ - body: { createTokenWithScopes: scopes }, - ...operationOptionsToRequestOptionsBase(updatedOptions), + const { identity, accessToken } = await this.client.communicationIdentityOperations.create({ + createTokenWithScopes: scopes, + ...updatedOptions, }); return { ...accessToken!, @@ -236,9 +219,9 @@ export class CommunicationIdentityClient { ): Promise { const { span, updatedOptions } = createSpan("CommunicationIdentity-deleteUser", options); try { - await this.client.delete( + await this.client.communicationIdentityOperations.delete( user.communicationUserId, - operationOptionsToRequestOptionsBase(updatedOptions) + updatedOptions ); } catch (e) { span.setStatus({ @@ -266,11 +249,10 @@ export class CommunicationIdentityClient { options ); try { - const { _response, ...result } = await this.client.exchangeTeamsUserAccessToken( - { token: teamsUserAadToken }, - operationOptionsToRequestOptionsBase(updatedOptions) + return await this.client.communicationIdentityOperations.exchangeTeamsUserAccessToken( + teamsUserAadToken, + updatedOptions ); - return result; } catch (e) { span.setStatus({ code: SpanStatusCode.ERROR, diff --git a/sdk/communication/communication-identity/src/generated/src/identityRestClient.ts b/sdk/communication/communication-identity/src/generated/src/identityRestClient.ts index 36df50d47e08..a2fdf3314b68 100644 --- a/sdk/communication/communication-identity/src/generated/src/identityRestClient.ts +++ b/sdk/communication/communication-identity/src/generated/src/identityRestClient.ts @@ -6,13 +6,12 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as operations from "./operations"; -import * as Models from "./models"; -import * as Mappers from "./models/mappers"; +import { CommunicationIdentityOperationsImpl } from "./operations"; +import { CommunicationIdentityOperations } from "./operationsInterfaces"; import { IdentityRestClientContext } from "./identityRestClientContext"; import { IdentityRestClientOptionalParams } from "./models"; -class IdentityRestClient extends IdentityRestClientContext { +export class IdentityRestClient extends IdentityRestClientContext { /** * Initializes a new instance of the IdentityRestClient class. * @param endpoint The communication resource, for example https://my-resource.communication.azure.com @@ -20,18 +19,10 @@ class IdentityRestClient extends IdentityRestClientContext { */ constructor(endpoint: string, options?: IdentityRestClientOptionalParams) { super(endpoint, options); - this.communicationIdentity = new operations.CommunicationIdentity(this); + this.communicationIdentityOperations = new CommunicationIdentityOperationsImpl( + this + ); } - communicationIdentity: operations.CommunicationIdentity; + communicationIdentityOperations: CommunicationIdentityOperations; } - -// Operation Specifications - -export { - IdentityRestClient, - IdentityRestClientContext, - Models as IdentityRestModels, - Mappers as IdentityRestMappers -}; -export * from "./operations"; diff --git a/sdk/communication/communication-identity/src/generated/src/identityRestClientContext.ts b/sdk/communication/communication-identity/src/generated/src/identityRestClientContext.ts index 32a6564ab87a..0c05d7f4bdb0 100644 --- a/sdk/communication/communication-identity/src/generated/src/identityRestClientContext.ts +++ b/sdk/communication/communication-identity/src/generated/src/identityRestClientContext.ts @@ -6,13 +6,10 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as coreHttp from "@azure/core-http"; +import * as coreClient from "@azure/core-client"; import { IdentityRestClientOptionalParams } from "./models"; -const packageName = "azure-communication-identity"; -const packageVersion = "1.1.0-beta.1"; - -export class IdentityRestClientContext extends coreHttp.ServiceClient { +export class IdentityRestClientContext extends coreClient.ServiceClient { endpoint: string; apiVersion: string; @@ -30,18 +27,25 @@ export class IdentityRestClientContext extends coreHttp.ServiceClient { if (!options) { options = {}; } - - if (!options.userAgent) { - const defaultUserAgent = coreHttp.getDefaultUserAgentValue(); - options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; - } - - super(undefined, options); - - this.requestContentType = "application/json; charset=utf-8"; - - this.baseUri = options.endpoint || "{endpoint}"; - + const defaults: IdentityRestClientOptionalParams = { + requestContentType: "application/json; charset=utf-8" + }; + + const packageDetails = `azsdk-js-communication-identity/1.1.0-beta.2`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` + : `${packageDetails}`; + + const optionsWithDefaults = { + ...defaults, + ...options, + userAgentOptions: { + userAgentPrefix + }, + baseUri: options.endpoint || "{endpoint}" + }; + super(optionsWithDefaults); // Parameter assignments this.endpoint = endpoint; diff --git a/sdk/communication/communication-identity/src/generated/src/index.ts b/sdk/communication/communication-identity/src/generated/src/index.ts new file mode 100644 index 000000000000..316c9f819d4a --- /dev/null +++ b/sdk/communication/communication-identity/src/generated/src/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./models"; +export { IdentityRestClient } from "./identityRestClient"; +export { IdentityRestClientContext } from "./identityRestClientContext"; +export * from "./operationsInterfaces"; diff --git a/sdk/communication/communication-identity/src/generated/src/models/index.ts b/sdk/communication/communication-identity/src/generated/src/models/index.ts index f5ca9a461214..3c88e2bc3d01 100644 --- a/sdk/communication/communication-identity/src/generated/src/models/index.ts +++ b/sdk/communication/communication-identity/src/generated/src/models/index.ts @@ -6,190 +6,127 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as coreHttp from "@azure/core-http"; +import * as coreClient from "@azure/core-client"; export interface CommunicationIdentityCreateRequest { - /** - * Also create access token for the created identity. - */ + /** Also create access token for the created identity. */ createTokenWithScopes?: CommunicationIdentityTokenScope[]; } -/** - * A communication identity with access token. - */ +/** A communication identity with access token. */ export interface CommunicationIdentityAccessTokenResult { - /** - * A communication identity. - */ + /** A communication identity. */ identity: CommunicationIdentity; - /** - * An access token. - */ + /** An access token. */ accessToken?: CommunicationIdentityAccessToken; } -/** - * A communication identity. - */ +/** A communication identity. */ export interface CommunicationIdentity { - /** - * Identifier of the identity. - */ + /** Identifier of the identity. */ id: string; } -/** - * An access token. - */ +/** An access token. */ export interface CommunicationIdentityAccessToken { - /** - * The access token issued for the identity. - */ + /** The access token issued for the identity. */ token: string; - /** - * The expiry time of the token. - */ + /** The expiry time of the token. */ expiresOn: Date; } -/** - * The Communication Services error. - */ +/** The Communication Services error. */ export interface CommunicationErrorResponse { - /** - * The Communication Services error. - */ + /** The Communication Services error. */ error: CommunicationError; } -/** - * The Communication Services error. - */ +/** The Communication Services error. */ export interface CommunicationError { - /** - * The error code. - */ + /** The error code. */ code: string; - /** - * The error message. - */ + /** The error message. */ message: string; /** * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly target?: string; /** * Further details about specific errors that led to this error. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly details?: CommunicationError[]; /** * The inner error if any. + * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly innerError?: CommunicationError; } export interface TeamsUserAccessTokenRequest { - /** - * AAD access token of a Teams User to acquire a new Communication Identity access token. - */ + /** AAD access token of a Teams User to acquire a new Communication Identity access token. */ token: string; } export interface CommunicationIdentityAccessTokenRequest { - /** - * List of scopes attached to the token. - */ + /** List of scopes attached to the token. */ scopes: CommunicationIdentityTokenScope[]; } -/** - * Defines values for CommunicationIdentityTokenScope. - */ -export type CommunicationIdentityTokenScope = "chat" | "voip"; +/** Known values of {@link CommunicationIdentityTokenScope} that the service accepts. */ +export enum KnownCommunicationIdentityTokenScope { + Chat = "chat", + Voip = "voip" +} /** - * Optional parameters. + * Defines values for CommunicationIdentityTokenScope. \ + * {@link KnownCommunicationIdentityTokenScope} can be used interchangeably with CommunicationIdentityTokenScope, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **chat** \ + * **voip** */ +export type CommunicationIdentityTokenScope = string; + +/** Optional parameters. */ export interface CommunicationIdentityCreateOptionalParams - extends coreHttp.OperationOptions { - /** - * If specified, creates also a Communication Identity access token associated with the identity and containing the requested scopes. - */ - body?: CommunicationIdentityCreateRequest; + extends coreClient.OperationOptions { + /** Also create access token for the created identity. */ + createTokenWithScopes?: CommunicationIdentityTokenScope[]; } -/** - * Contains response data for the create operation. - */ -export type CommunicationIdentityCreateResponse = CommunicationIdentityAccessTokenResult & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CommunicationIdentityAccessTokenResult; - }; -}; +/** Contains response data for the create operation. */ +export type CommunicationIdentityCreateResponse = CommunicationIdentityAccessTokenResult; -/** - * Contains response data for the exchangeTeamsUserAccessToken operation. - */ -export type CommunicationIdentityExchangeTeamsUserAccessTokenResponse = CommunicationIdentityAccessToken & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CommunicationIdentityAccessToken; - }; -}; +/** Optional parameters. */ +export interface CommunicationIdentityDeleteOptionalParams + extends coreClient.OperationOptions {} -/** - * Contains response data for the issueAccessToken operation. - */ -export type CommunicationIdentityIssueAccessTokenResponse = CommunicationIdentityAccessToken & { - /** - * The underlying HTTP response. - */ - _response: coreHttp.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: CommunicationIdentityAccessToken; - }; -}; +/** Optional parameters. */ +export interface CommunicationIdentityRevokeAccessTokensOptionalParams + extends coreClient.OperationOptions {} -/** - * Optional parameters. - */ +/** Optional parameters. */ +export interface CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the exchangeTeamsUserAccessToken operation. */ +export type CommunicationIdentityExchangeTeamsUserAccessTokenResponse = CommunicationIdentityAccessToken; + +/** Optional parameters. */ +export interface CommunicationIdentityIssueAccessTokenOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the issueAccessToken operation. */ +export type CommunicationIdentityIssueAccessTokenResponse = CommunicationIdentityAccessToken; + +/** Optional parameters. */ export interface IdentityRestClientOptionalParams - extends coreHttp.ServiceClientOptions { - /** - * Api Version - */ + extends coreClient.ServiceClientOptions { + /** Api Version */ apiVersion?: string; - /** - * Overrides client endpoint. - */ + /** Overrides client endpoint. */ endpoint?: string; } diff --git a/sdk/communication/communication-identity/src/generated/src/models/mappers.ts b/sdk/communication/communication-identity/src/generated/src/models/mappers.ts index 41424a5e0a12..f082f573a282 100644 --- a/sdk/communication/communication-identity/src/generated/src/models/mappers.ts +++ b/sdk/communication/communication-identity/src/generated/src/models/mappers.ts @@ -6,9 +6,9 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as coreHttp from "@azure/core-http"; +import * as coreClient from "@azure/core-client"; -export const CommunicationIdentityCreateRequest: coreHttp.CompositeMapper = { +export const CommunicationIdentityCreateRequest: coreClient.CompositeMapper = { type: { name: "Composite", className: "CommunicationIdentityCreateRequest", @@ -17,14 +17,18 @@ export const CommunicationIdentityCreateRequest: coreHttp.CompositeMapper = { serializedName: "createTokenWithScopes", type: { name: "Sequence", - element: { type: { name: "String" } } + element: { + type: { + name: "String" + } + } } } } } }; -export const CommunicationIdentityAccessTokenResult: coreHttp.CompositeMapper = { +export const CommunicationIdentityAccessTokenResult: coreClient.CompositeMapper = { type: { name: "Composite", className: "CommunicationIdentityAccessTokenResult", @@ -47,7 +51,7 @@ export const CommunicationIdentityAccessTokenResult: coreHttp.CompositeMapper = } }; -export const CommunicationIdentity: coreHttp.CompositeMapper = { +export const CommunicationIdentity: coreClient.CompositeMapper = { type: { name: "Composite", className: "CommunicationIdentity", @@ -63,7 +67,7 @@ export const CommunicationIdentity: coreHttp.CompositeMapper = { } }; -export const CommunicationIdentityAccessToken: coreHttp.CompositeMapper = { +export const CommunicationIdentityAccessToken: coreClient.CompositeMapper = { type: { name: "Composite", className: "CommunicationIdentityAccessToken", @@ -86,7 +90,7 @@ export const CommunicationIdentityAccessToken: coreHttp.CompositeMapper = { } }; -export const CommunicationErrorResponse: coreHttp.CompositeMapper = { +export const CommunicationErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", className: "CommunicationErrorResponse", @@ -102,7 +106,7 @@ export const CommunicationErrorResponse: coreHttp.CompositeMapper = { } }; -export const CommunicationError: coreHttp.CompositeMapper = { +export const CommunicationError: coreClient.CompositeMapper = { type: { name: "Composite", className: "CommunicationError", @@ -134,7 +138,10 @@ export const CommunicationError: coreHttp.CompositeMapper = { type: { name: "Sequence", element: { - type: { name: "Composite", className: "CommunicationError" } + type: { + name: "Composite", + className: "CommunicationError" + } } } }, @@ -149,7 +156,7 @@ export const CommunicationError: coreHttp.CompositeMapper = { } }; -export const TeamsUserAccessTokenRequest: coreHttp.CompositeMapper = { +export const TeamsUserAccessTokenRequest: coreClient.CompositeMapper = { type: { name: "Composite", className: "TeamsUserAccessTokenRequest", @@ -165,7 +172,7 @@ export const TeamsUserAccessTokenRequest: coreHttp.CompositeMapper = { } }; -export const CommunicationIdentityAccessTokenRequest: coreHttp.CompositeMapper = { +export const CommunicationIdentityAccessTokenRequest: coreClient.CompositeMapper = { type: { name: "Composite", className: "CommunicationIdentityAccessTokenRequest", @@ -175,7 +182,11 @@ export const CommunicationIdentityAccessTokenRequest: coreHttp.CompositeMapper = required: true, type: { name: "Sequence", - element: { type: { name: "String" } } + element: { + type: { + name: "String" + } + } } } } diff --git a/sdk/communication/communication-identity/src/generated/src/models/parameters.ts b/sdk/communication/communication-identity/src/generated/src/models/parameters.ts index 68a1672afbe7..2bbc50e82b02 100644 --- a/sdk/communication/communication-identity/src/generated/src/models/parameters.ts +++ b/sdk/communication/communication-identity/src/generated/src/models/parameters.ts @@ -10,7 +10,7 @@ import { OperationParameter, OperationURLParameter, OperationQueryParameter -} from "@azure/core-http"; +} from "@azure/core-client"; import { CommunicationIdentityCreateRequest as CommunicationIdentityCreateRequestMapper, TeamsUserAccessTokenRequest as TeamsUserAccessTokenRequestMapper, @@ -29,8 +29,20 @@ export const contentType: OperationParameter = { } }; -export const body: OperationParameter = { - parameterPath: ["options", "body"], +export const accept: OperationParameter = { + parameterPath: "accept", + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Accept", + type: { + name: "String" + } + } +}; + +export const createTokenWithScopes: OperationParameter = { + parameterPath: ["options", "createTokenWithScopes"], mapper: CommunicationIdentityCreateRequestMapper }; @@ -69,12 +81,12 @@ export const id: OperationURLParameter = { } }; -export const body1: OperationParameter = { - parameterPath: "body", +export const token: OperationParameter = { + parameterPath: "token", mapper: TeamsUserAccessTokenRequestMapper }; -export const body2: OperationParameter = { - parameterPath: "body", +export const scopes: OperationParameter = { + parameterPath: "scopes", mapper: CommunicationIdentityAccessTokenRequestMapper }; diff --git a/sdk/communication/communication-identity/src/generated/src/operations/communicationIdentity.ts b/sdk/communication/communication-identity/src/generated/src/operations/communicationIdentityOperations.ts similarity index 60% rename from sdk/communication/communication-identity/src/generated/src/operations/communicationIdentity.ts rename to sdk/communication/communication-identity/src/generated/src/operations/communicationIdentityOperations.ts index 7432ea3fbc66..9a879a6fecbd 100644 --- a/sdk/communication/communication-identity/src/generated/src/operations/communicationIdentity.ts +++ b/sdk/communication/communication-identity/src/generated/src/operations/communicationIdentityOperations.ts @@ -6,30 +6,33 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import * as coreHttp from "@azure/core-http"; +import { CommunicationIdentityOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; -import { IdentityRestClient } from "../identityRestClient"; +import { IdentityRestClientContext } from "../identityRestClientContext"; import { CommunicationIdentityCreateOptionalParams, CommunicationIdentityCreateResponse, - TeamsUserAccessTokenRequest, + CommunicationIdentityDeleteOptionalParams, + CommunicationIdentityRevokeAccessTokensOptionalParams, + CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams, CommunicationIdentityExchangeTeamsUserAccessTokenResponse, - CommunicationIdentityAccessTokenRequest, + CommunicationIdentityTokenScope, + CommunicationIdentityIssueAccessTokenOptionalParams, CommunicationIdentityIssueAccessTokenResponse } from "../models"; -/** - * Class representing a CommunicationIdentity. - */ -export class CommunicationIdentity { - private readonly client: IdentityRestClient; +/** Class containing CommunicationIdentityOperations operations. */ +export class CommunicationIdentityOperationsImpl + implements CommunicationIdentityOperations { + private readonly client: IdentityRestClientContext; /** - * Initialize a new instance of the class CommunicationIdentity class. + * Initialize a new instance of the class CommunicationIdentityOperations class. * @param client Reference to the service client */ - constructor(client: IdentityRestClient) { + constructor(client: IdentityRestClientContext) { this.client = client; } @@ -40,13 +43,7 @@ export class CommunicationIdentity { create( options?: CommunicationIdentityCreateOptionalParams ): Promise { - const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase( - options || {} - ); - return this.client.sendOperationRequest( - { options: operationOptions }, - createOperationSpec - ) as Promise; + return this.client.sendOperationRequest({ options }, createOperationSpec); } /** @@ -56,15 +53,12 @@ export class CommunicationIdentity { */ delete( id: string, - options?: coreHttp.OperationOptions - ): Promise { - const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase( - options || {} - ); + options?: CommunicationIdentityDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { id, options: operationOptions }, + { id, options }, deleteOperationSpec - ) as Promise; + ); } /** @@ -74,61 +68,51 @@ export class CommunicationIdentity { */ revokeAccessTokens( id: string, - options?: coreHttp.OperationOptions - ): Promise { - const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase( - options || {} - ); + options?: CommunicationIdentityRevokeAccessTokensOptionalParams + ): Promise { return this.client.sendOperationRequest( - { id, options: operationOptions }, + { id, options }, revokeAccessTokensOperationSpec - ) as Promise; + ); } /** * 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 token AAD access token of a Teams User to acquire a new Communication Identity access token. * @param options The options parameters. */ exchangeTeamsUserAccessToken( - body: TeamsUserAccessTokenRequest, - options?: coreHttp.OperationOptions + token: string, + options?: CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams ): Promise { - const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase( - options || {} - ); return this.client.sendOperationRequest( - { body, options: operationOptions }, + { token, options }, exchangeTeamsUserAccessTokenOperationSpec - ) as Promise; + ); } /** * Issue a new token for an identity. * @param id Identifier of the identity to issue token for. - * @param body Requested scopes for the new token. + * @param scopes List of scopes attached to the token. * @param options The options parameters. */ issueAccessToken( id: string, - body: CommunicationIdentityAccessTokenRequest, - options?: coreHttp.OperationOptions + scopes: CommunicationIdentityTokenScope[], + options?: CommunicationIdentityIssueAccessTokenOptionalParams ): Promise { - const operationOptions: coreHttp.RequestOptionsBase = coreHttp.operationOptionsToRequestOptionsBase( - options || {} - ); return this.client.sendOperationRequest( - { id, body, options: operationOptions }, + { id, scopes, options }, issueAccessTokenOperationSpec - ) as Promise; + ); } } // Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false); - -const createOperationSpec: coreHttp.OperationSpec = { +const createOperationSpec: coreClient.OperationSpec = { path: "/identities", httpMethod: "POST", responses: { @@ -139,14 +123,19 @@ const createOperationSpec: coreHttp.OperationSpec = { bodyMapper: Mappers.CommunicationErrorResponse } }, - requestBody: Parameters.body, + requestBody: { + parameterPath: { + createTokenWithScopes: ["options", "createTokenWithScopes"] + }, + mapper: Mappers.CommunicationIdentityCreateRequest + }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.endpoint], - headerParameters: [Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; -const deleteOperationSpec: coreHttp.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { path: "/identities/{id}", httpMethod: "DELETE", responses: { @@ -157,9 +146,10 @@ const deleteOperationSpec: coreHttp.OperationSpec = { }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.endpoint, Parameters.id], + headerParameters: [Parameters.accept], serializer }; -const revokeAccessTokensOperationSpec: coreHttp.OperationSpec = { +const revokeAccessTokensOperationSpec: coreClient.OperationSpec = { path: "/identities/{id}/:revokeAccessTokens", httpMethod: "POST", responses: { @@ -170,9 +160,10 @@ const revokeAccessTokensOperationSpec: coreHttp.OperationSpec = { }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.endpoint, Parameters.id], + headerParameters: [Parameters.accept], serializer }; -const exchangeTeamsUserAccessTokenOperationSpec: coreHttp.OperationSpec = { +const exchangeTeamsUserAccessTokenOperationSpec: coreClient.OperationSpec = { path: "/teamsUser/:exchangeAccessToken", httpMethod: "POST", responses: { @@ -183,14 +174,17 @@ const exchangeTeamsUserAccessTokenOperationSpec: coreHttp.OperationSpec = { bodyMapper: Mappers.CommunicationErrorResponse } }, - requestBody: Parameters.body1, + requestBody: { + parameterPath: { token: ["token"] }, + mapper: { ...Mappers.TeamsUserAccessTokenRequest, required: true } + }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.endpoint], - headerParameters: [Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; -const issueAccessTokenOperationSpec: coreHttp.OperationSpec = { +const issueAccessTokenOperationSpec: coreClient.OperationSpec = { path: "/identities/{id}/:issueAccessToken", httpMethod: "POST", responses: { @@ -201,10 +195,16 @@ const issueAccessTokenOperationSpec: coreHttp.OperationSpec = { bodyMapper: Mappers.CommunicationErrorResponse } }, - requestBody: Parameters.body2, + requestBody: { + parameterPath: { scopes: ["scopes"] }, + mapper: { + ...Mappers.CommunicationIdentityAccessTokenRequest, + required: true + } + }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.endpoint, Parameters.id], - headerParameters: [Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer }; diff --git a/sdk/communication/communication-identity/src/generated/src/operations/index.ts b/sdk/communication/communication-identity/src/generated/src/operations/index.ts index 9d61601db709..c0e3fc741e5a 100644 --- a/sdk/communication/communication-identity/src/generated/src/operations/index.ts +++ b/sdk/communication/communication-identity/src/generated/src/operations/index.ts @@ -6,4 +6,4 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./communicationIdentity"; +export * from "./communicationIdentityOperations"; diff --git a/sdk/communication/communication-identity/src/generated/src/operationsInterfaces/communicationIdentityOperations.ts b/sdk/communication/communication-identity/src/generated/src/operationsInterfaces/communicationIdentityOperations.ts new file mode 100644 index 000000000000..6895b72a8c46 --- /dev/null +++ b/sdk/communication/communication-identity/src/generated/src/operationsInterfaces/communicationIdentityOperations.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + CommunicationIdentityCreateOptionalParams, + CommunicationIdentityCreateResponse, + CommunicationIdentityDeleteOptionalParams, + CommunicationIdentityRevokeAccessTokensOptionalParams, + CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams, + CommunicationIdentityExchangeTeamsUserAccessTokenResponse, + CommunicationIdentityTokenScope, + CommunicationIdentityIssueAccessTokenOptionalParams, + CommunicationIdentityIssueAccessTokenResponse +} from "../models"; + +/** Interface representing a CommunicationIdentityOperations. */ +export interface CommunicationIdentityOperations { + /** + * Create a new identity, and optionally, an access token. + * @param options The options parameters. + */ + create( + options?: CommunicationIdentityCreateOptionalParams + ): Promise; + /** + * Delete the identity, revoke all tokens for the identity and delete all associated data. + * @param id Identifier of the identity to be deleted. + * @param options The options parameters. + */ + delete( + id: string, + options?: CommunicationIdentityDeleteOptionalParams + ): Promise; + /** + * Revoke all access tokens for the specific identity. + * @param id Identifier of the identity. + * @param options The options parameters. + */ + revokeAccessTokens( + id: string, + options?: CommunicationIdentityRevokeAccessTokensOptionalParams + ): Promise; + /** + * Exchange an AAD access token of a Teams user for a new Communication Identity access token with a + * matching expiration time. + * @param token AAD access token of a Teams User to acquire a new Communication Identity access token. + * @param options The options parameters. + */ + exchangeTeamsUserAccessToken( + token: string, + options?: CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams + ): Promise; + /** + * Issue a new token for an identity. + * @param id Identifier of the identity to issue token for. + * @param scopes List of scopes attached to the token. + * @param options The options parameters. + */ + issueAccessToken( + id: string, + scopes: CommunicationIdentityTokenScope[], + options?: CommunicationIdentityIssueAccessTokenOptionalParams + ): Promise; +} diff --git a/sdk/communication/communication-identity/src/generated/src/operationsInterfaces/index.ts b/sdk/communication/communication-identity/src/generated/src/operationsInterfaces/index.ts new file mode 100644 index 000000000000..c0e3fc741e5a --- /dev/null +++ b/sdk/communication/communication-identity/src/generated/src/operationsInterfaces/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export * from "./communicationIdentityOperations"; diff --git a/sdk/communication/communication-identity/src/models.ts b/sdk/communication/communication-identity/src/models.ts index e7174215ef40..bb66002a870c 100644 --- a/sdk/communication/communication-identity/src/models.ts +++ b/sdk/communication/communication-identity/src/models.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { PipelineOptions } from "@azure/core-http"; +import { CommonClientOptions } from "@azure/core-client"; import { CommunicationUserIdentifier } from "@azure/communication-common"; /** @@ -12,7 +12,7 @@ export type TokenScope = "chat" | "voip"; /** * Client options used to configure the CommunicationIdentity API requests. */ -export interface CommunicationIdentityClientOptions extends PipelineOptions {} +export interface CommunicationIdentityClientOptions extends CommonClientOptions {} /** * The access token for a user. diff --git a/sdk/communication/communication-identity/swagger/README.md b/sdk/communication/communication-identity/swagger/README.md index 0a7000128f2f..c5ec743a5c45 100644 --- a/sdk/communication/communication-identity/swagger/README.md +++ b/sdk/communication/communication-identity/swagger/README.md @@ -5,10 +5,10 @@ ## Configuration ```yaml -package-name: azure-communication-identity +package-name: "@azure/communication-identity" override-client-name: IdentityRestClient description: Communication identity client -package-version: 1.1.0-beta.1 +package-version: 1.1.0-beta.2 generate-metadata: false license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../src/generated @@ -18,7 +18,7 @@ model-date-time-as-string: false optional-response-headers: true payload-flattening-threshold: 10 use-extension: - "@autorest/typescript": "6.0.0-dev.20200623.2" + "@autorest/typescript": "6.0.0-beta.15" add-credentials: false azure-arm: false v3: true diff --git a/sdk/communication/communication-identity/test/public/communicationIdentityClient.mocked.spec.ts b/sdk/communication/communication-identity/test/public/communicationIdentityClient.mocked.spec.ts index 0e95acab1025..7d816afdc874 100644 --- a/sdk/communication/communication-identity/test/public/communicationIdentityClient.mocked.spec.ts +++ b/sdk/communication/communication-identity/test/public/communicationIdentityClient.mocked.spec.ts @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { isNode } from "@azure/core-http"; import { CommunicationUserIdentifier, isCommunicationUserIdentifier, } from "@azure/communication-common"; -import { assert } from "chai"; -import sinon from "sinon"; +import { getTokenForTeamsUserHttpClient, getTokenHttpClient } from "./utils/mockHttpClients"; import { CommunicationIdentityClient } from "../../src"; import { TestCommunicationIdentityClient } from "./utils/testCommunicationIdentityClient"; -import { getTokenForTeamsUserHttpClient, getTokenHttpClient } from "./utils/mockHttpClients"; +import { assert } from "chai"; +import { isNode } from "@azure/core-util"; +import sinon from "sinon"; describe("CommunicationIdentityClient [Mocked]", () => { const dateHeader = "x-ms-date"; @@ -58,7 +58,7 @@ describe("CommunicationIdentityClient [Mocked]", () => { sinon.assert.calledOnce(spy); const request = spy.getCall(0).args[0]; - assert.deepEqual(JSON.parse(request.body), { scopes: ["chat"] }); + assert.deepEqual(JSON.parse(request.body as string), { scopes: ["chat"] }); }); it("[getToken] excludes _response from results", async () => { diff --git a/sdk/communication/communication-identity/test/public/communicationIdentityClient.spec.ts b/sdk/communication/communication-identity/test/public/communicationIdentityClient.spec.ts index c805cac567e2..0ff2d3e13907 100644 --- a/sdk/communication/communication-identity/test/public/communicationIdentityClient.spec.ts +++ b/sdk/communication/communication-identity/test/public/communicationIdentityClient.spec.ts @@ -5,26 +5,26 @@ import { CommunicationUserIdentifier, isCommunicationUserIdentifier, } from "@azure/communication-common"; -import { assert } from "chai"; -import { matrix } from "@azure/test-utils"; -import { isPlaybackMode, Recorder } from "@azure-tools/test-recorder"; -import { CommunicationIdentityClient } from "../../src"; +import { Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; import { createRecordedCommunicationIdentityClient, createRecordedCommunicationIdentityClientWithToken, } from "./utils/recordedClient"; +import { CommunicationIdentityClient } from "../../src"; import { Context } from "mocha"; +import { assert } from "chai"; +import { matrix } from "@azure/test-utils"; -matrix([[true, false]], async function (useAad) { +matrix([[true, false]], async function (useAad: boolean) { describe(`CommunicationIdentityClient [Playback/Live]${useAad ? " [AAD]" : ""}`, function () { let recorder: Recorder; let client: CommunicationIdentityClient; - beforeEach(function (this: Context) { + beforeEach(async function (this: Context) { if (useAad) { - ({ client, recorder } = createRecordedCommunicationIdentityClientWithToken(this)); + ({ client, recorder } = await createRecordedCommunicationIdentityClientWithToken(this)); } else { - ({ client, recorder } = createRecordedCommunicationIdentityClient(this)); + ({ client, recorder } = await createRecordedCommunicationIdentityClient(this)); } }); diff --git a/sdk/communication/communication-identity/test/public/node/getTokenForTeamsUser.node.spec.ts b/sdk/communication/communication-identity/test/public/node/getTokenForTeamsUser.node.spec.ts index eeea6b9c9239..4942ec214ab5 100644 --- a/sdk/communication/communication-identity/test/public/node/getTokenForTeamsUser.node.spec.ts +++ b/sdk/communication/communication-identity/test/public/node/getTokenForTeamsUser.node.spec.ts @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { assert } from "chai"; -import { matrix } from "@azure/test-utils"; -import { env, isPlaybackMode, Recorder } from "@azure-tools/test-recorder"; -import { UsernamePasswordCredential } from "@azure/identity"; import { CommunicationAccessToken, CommunicationIdentityClient } from "../../../src"; +import { Recorder, env, isPlaybackMode } from "@azure-tools/test-recorder"; import { createRecordedCommunicationIdentityClient, createRecordedCommunicationIdentityClientWithToken, } from "../utils/recordedClient"; import { Context } from "mocha"; +import { UsernamePasswordCredential } from "@azure/identity"; +import { assert } from "chai"; +import { matrix } from "@azure/test-utils"; matrix([[true, false]], async function (useAad) { describe(`Get Token For Teams User [Playback/Live]${useAad ? " [AAD]" : ""}`, function () { @@ -26,9 +26,9 @@ matrix([[true, false]], async function (useAad) { beforeEach(async function (this: Context) { if (useAad) { - ({ client, recorder } = createRecordedCommunicationIdentityClientWithToken(this)); + ({ client, recorder } = await createRecordedCommunicationIdentityClientWithToken(this)); } else { - ({ client, recorder } = createRecordedCommunicationIdentityClient(this)); + ({ client, recorder } = await createRecordedCommunicationIdentityClient(this)); } }); @@ -44,13 +44,13 @@ matrix([[true, false]], async function (useAad) { teamsToken = "sanitized"; } else { const credential = new UsernamePasswordCredential( - env.COMMUNICATION_M365_AAD_TENANT, - env.COMMUNICATION_M365_APP_ID, - env.COMMUNICATION_MSAL_USERNAME, - env.COMMUNICATION_MSAL_PASSWORD + env.COMMUNICATION_M365_AAD_TENANT ?? "", + env.COMMUNICATION_M365_APP_ID ?? "", + env.COMMUNICATION_MSAL_USERNAME ?? "", + env.COMMUNICATION_MSAL_PASSWORD ?? "" ); - const response = await credential.getToken([env.COMMUNICATION_M365_SCOPE]); + const response = await credential.getToken([env.COMMUNICATION_M365_SCOPE ?? ""]); assert.isNotNull(response); teamsToken = response!.token; } @@ -93,7 +93,7 @@ matrix([[true, false]], async function (useAad) { it("throws an error when attempting to exchange an expired Teams User AAD token", async function () { try { - let expiredToken = env.COMMUNICATION_EXPIRED_TEAMS_TOKEN; + let expiredToken = env.COMMUNICATION_EXPIRED_TEAMS_TOKEN ?? ""; if (isPlaybackMode()) { expiredToken = "sanitized"; } diff --git a/sdk/communication/communication-identity/test/public/utils/mockHttpClients.ts b/sdk/communication/communication-identity/test/public/utils/mockHttpClients.ts index 63b2682af0fd..54c8f799410b 100644 --- a/sdk/communication/communication-identity/test/public/utils/mockHttpClients.ts +++ b/sdk/communication/communication-identity/test/public/utils/mockHttpClients.ts @@ -1,7 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { HttpClient, WebResourceLike, HttpOperationResponse, HttpHeaders } from "@azure/core-http"; +import { + HttpClient, + PipelineRequest, + PipelineResponse, + createHttpHeaders, +} from "@azure/core-rest-pipeline"; import { CommunicationAccessToken } from "../../../src"; import { CommunicationIdentityAccessTokenResult } from "../../../src/generated/src/models"; @@ -10,12 +15,12 @@ export const createMockHttpClient = >( parsedBody?: T ): HttpClient => { return { - async sendRequest(httpRequest: WebResourceLike): Promise { + async sendRequest(httpRequest: PipelineRequest): Promise { return { status, - headers: new HttpHeaders(), + headers: createHttpHeaders(), request: httpRequest, - parsedBody, + bodyAsText: JSON.stringify(parsedBody), }; }, }; diff --git a/sdk/communication/communication-identity/test/public/utils/recordedClient.ts b/sdk/communication/communication-identity/test/public/utils/recordedClient.ts index c099b0e30963..507ec0f8e0c3 100644 --- a/sdk/communication/communication-identity/test/public/utils/recordedClient.ts +++ b/sdk/communication/communication-identity/test/public/utils/recordedClient.ts @@ -1,38 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { Context } from "mocha"; -import * as dotenv from "dotenv"; - +import { Context, Test } from "mocha"; import { - env, Recorder, - record, - RecorderEnvironmentSetup, + RecorderStartOptions, + SanitizerOptions, + env, isPlaybackMode, } from "@azure-tools/test-recorder"; -import { - DefaultHttpClient, - HttpClient, - HttpOperationResponse, - isNode, - TokenCredential, - WebResourceLike, -} from "@azure/core-http"; -import { CommunicationIdentityClient, CommunicationIdentityClientOptions } from "../../../src"; -import { ClientSecretCredential, DefaultAzureCredential } from "@azure/identity"; +import { CommunicationIdentityClient } from "../../../src"; +import { TokenCredential } from "@azure/core-auth"; +import { createTestCredential } from "@azure-tools/test-credential"; import { parseConnectionString } from "@azure/communication-common"; -if (isNode) { - dotenv.config(); -} - export interface RecordedClient { client: T; recorder: Recorder; } -const replaceableVariables: { [k: string]: string } = { +const envSetupForPlayback: { [k: string]: string } = { COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING: "endpoint=https://endpoint/;accesskey=banana", INCLUDE_PHONENUMBER_LIVE_TESTS: "false", COMMUNICATION_ENDPOINT: "https://endpoint/", @@ -48,107 +35,89 @@ const replaceableVariables: { [k: string]: string } = { SKIP_INT_IDENTITY_EXCHANGE_TOKEN_TEST: "false", }; -export const environmentSetup: RecorderEnvironmentSetup = { - replaceableVariables, - customizationsOnRecordings: [ - (recording: string): string => - recording.replace(/"token"\s?:\s?"[^"]*"/g, `"token":"sanitized"`), - (recording: string): string => - recording.replace(/"access_token"\s?:\s?"[^"]*"/g, `"access_token":"sanitized"`), - (recording: string): string => recording.replace(/(https:\/\/)([^/',]*)/, "$1endpoint"), - (recording: string): string => recording.replace(/"id"\s?:\s?"[^"]*"/g, `"id":"sanitized"`), - (recording: string): string => { - return recording.replace( - /(https:\/\/[^/',]*\/identities\/)[^/',]*(\/token)/, - "$1sanitized$2" - ); +const sanitizerOptions: SanitizerOptions = { + connectionStringSanitizers: [ + { + actualConnString: env.COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING, + fakeConnString: envSetupForPlayback["COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING"], + }, + ], + uriSanitizers: [ + { + regex: true, + target: `(.*)/identities/(?.*?)[/|?](.*)`, + value: "sanitized", + groupForReplace: "secret_content", }, - (recording: string): string => - recording.replace(/\/identities\/[^/'",]*/, "/identities/sanitized"), - (recording: string): string => recording.replace(/\+\d{1}\d{3}\d{3}\d{4}/g, "+18005551234"), - (recording: string): string => - recording.replace( - /[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}/gi, - "00000000-0000-0000-0000-000000000000" - ), ], - queryParametersToSkip: [], + generalSanitizers: [ + { regex: true, target: `"token"\\s?:\\s?"[^"]*"`, value: `"token":"sanitized"` }, + { regex: true, target: `"id"\\s?:\\s?"[^"]*"`, value: `"id":"sanitized"` }, + { + regex: true, + target: `[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}`, + value: `sanitized`, + }, + ], +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback, + sanitizerOptions: sanitizerOptions, }; -export function createRecordedCommunicationIdentityClient( +export async function createRecorder(context: Test | undefined): Promise { + const recorder = new Recorder(context); + await recorder.start(recorderOptions); + await recorder.setMatcher("CustomDefaultMatcher", { + excludedHeaders: [ + "Accept-Language", // This is env-dependent + "x-ms-content-sha256", // This is dependent on the current datetime + ], + }); + return recorder; +} + +export async function createRecordedCommunicationIdentityClient( context: Context -): RecordedClient { - const recorder = record(context, environmentSetup); +): Promise> { + const recorder = await createRecorder(context.currentTest); + + const client = new CommunicationIdentityClient( + env.COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING ?? "", + recorder.configureClientOptions({}) + ); - // casting is a workaround to enable min-max testing return { - client: new CommunicationIdentityClient(env.COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING, { - httpClient: createTestHttpClient(), - } as CommunicationIdentityClientOptions), + client, recorder, }; } -export function createRecordedCommunicationIdentityClientWithToken( +export async function createRecordedCommunicationIdentityClientWithToken( context: Context -): RecordedClient { - const recorder = record(context, environmentSetup); +): Promise> { + const recorder = await createRecorder(context.currentTest); + let credential: TokenCredential; const endpoint = parseConnectionString( - env.COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING + env.COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING ?? "" ).endpoint; if (isPlaybackMode()) { credential = { - getToken: async (_scopes) => { + getToken: async (_scopes: any) => { return { token: "testToken", expiresOnTimestamp: 11111 }; }, }; - - // casting is a workaround to enable min-max testing - return { - client: new CommunicationIdentityClient(endpoint, credential, { - httpClient: createTestHttpClient(), - } as CommunicationIdentityClientOptions), - recorder, - }; - } - - if (isNode) { - credential = new DefaultAzureCredential(); } else { - credential = new ClientSecretCredential( - env.AZURE_TENANT_ID, - env.AZURE_CLIENT_ID, - env.AZURE_CLIENT_SECRET - ); + credential = createTestCredential(); } - // casting is a workaround to enable min-max testing - return { - client: new CommunicationIdentityClient(endpoint, credential, { - httpClient: createTestHttpClient(), - } as CommunicationIdentityClientOptions), - recorder, - }; -} - -function createTestHttpClient(): HttpClient { - const customHttpClient = new DefaultHttpClient(); - - const originalSendRequest = customHttpClient.sendRequest; - customHttpClient.sendRequest = async function ( - httpRequest: WebResourceLike - ): Promise { - const requestResponse = await originalSendRequest.apply(this, [httpRequest]); - - console.log( - `MS-CV header for request: ${httpRequest.url} (${ - requestResponse.status - } - ${requestResponse.headers.get("ms-cv")})` - ); - - return requestResponse; - }; + const client = new CommunicationIdentityClient( + endpoint, + credential, + recorder.configureClientOptions({}) + ); - return customHttpClient; + return { client, recorder }; } diff --git a/sdk/communication/communication-identity/test/public/utils/testCommunicationIdentityClient.ts b/sdk/communication/communication-identity/test/public/utils/testCommunicationIdentityClient.ts index a8447aa03481..789d23f7d9fc 100644 --- a/sdk/communication/communication-identity/test/public/utils/testCommunicationIdentityClient.ts +++ b/sdk/communication/communication-identity/test/public/utils/testCommunicationIdentityClient.ts @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { OperationOptions } from "@azure/core-http"; -import { CommunicationUserIdentifier } from "@azure/communication-common"; import { CommunicationAccessToken, CommunicationIdentityClient, @@ -11,12 +9,14 @@ import { TokenScope, } from "../../../src"; import { - getTokenHttpClient, - createUserHttpClient, - revokeTokensHttpClient, createUserAndTokenHttpClient, + createUserHttpClient, getTokenForTeamsUserHttpClient, + getTokenHttpClient, + revokeTokensHttpClient, } from "./mockHttpClients"; +import { CommunicationUserIdentifier } from "@azure/communication-common"; +import { OperationOptions } from "@azure/core-client"; export class TestCommunicationIdentityClient { private connectionString: string = "endpoint=https://contoso.spool.azure.local;accesskey=banana";