-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MOB-9522]: Fix JWT UserID Support (#452)
* [DOCS-4818] EUDC instructions update (#428) * EUDC instructions update * Formatting * Bump braces from 3.0.2 to 3.0.3 (#406) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](micromatch/braces@3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ws from 7.5.9 to 7.5.10 (#409) Bumps [ws](https://github.com/websockets/ws) from 7.5.9 to 7.5.10. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](websockets/ws@7.5.9...7.5.10) --- updated-dependencies: - dependency-name: ws dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump axios from 1.6.2 to 1.7.4 (#433) Bumps [axios](https://github.com/axios/axios) from 1.6.2 to 1.7.4. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](axios/axios@v1.6.2...v1.7.4) --- updated-dependencies: - dependency-name: axios dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump postcss from 8.3.11 to 8.4.31 (#235) * Bump postcss from 8.3.11 to 8.4.31 Bumps [postcss](https://github.com/postcss/postcss) from 8.3.11 to 8.4.31. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](postcss/postcss@8.3.11...8.4.31) --- updated-dependencies: - dependency-name: postcss dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * fix spaces --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mitch Prewitt <[email protected]> * Bump braces from 3.0.2 to 3.0.3 in /example (#434) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](micromatch/braces@3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump requirejs from 2.3.6 to 2.3.7 (#435) Bumps [requirejs](https://github.com/jrburke/r.js) from 2.3.6 to 2.3.7. - [Commits](requirejs/r.js@2.3.6...2.3.7) --- updated-dependencies: - dependency-name: requirejs dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump micromatch from 4.0.5 to 4.0.8 in /example (#447) Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.5 to 4.0.8. - [Release notes](https://github.com/micromatch/micromatch/releases) - [Changelog](https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md) - [Commits](micromatch/micromatch@4.0.5...4.0.8) --- updated-dependencies: - dependency-name: micromatch dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mitch Prewitt <[email protected]> * update version for release (#448) * Bump webpack from 5.76.0 to 5.94.0 (#443) Bumps [webpack](https://github.com/webpack/webpack) from 5.76.0 to 5.94.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](webpack/webpack@v5.76.0...v5.94.0) --- updated-dependencies: - dependency-name: webpack dependency-type: direct:development ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * EUDC -> EDC (#449) * fix jwt generator for userid * some cleanup and fixes * unused imports * fix build * revert, outside of scope * test not needed --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Brad Umbaugh <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
25fcde1
commit 8f6e6a7
Showing
8 changed files
with
248 additions
and
355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1470,12 +1470,19 @@ brace-expansion@^1.1.7: | |
balanced-match "^1.0.0" | ||
concat-map "0.0.1" | ||
|
||
braces@^3.0.2, braces@~3.0.2: | ||
braces@^3.0.3: | ||
version "3.0.3" | ||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" | ||
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== | ||
dependencies: | ||
fill-range "^7.1.1" | ||
|
||
braces@~3.0.2: | ||
version "3.0.2" | ||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" | ||
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== | ||
dependencies: | ||
fill-range "^7.0.1" | ||
fill-range "^7.1.1" | ||
|
||
browser-process-hrtime@^1.0.0: | ||
version "1.0.0" | ||
|
@@ -2379,10 +2386,17 @@ file-entry-cache@^6.0.1: | |
dependencies: | ||
flat-cache "^3.0.4" | ||
|
||
fill-range@^7.0.1: | ||
version "7.0.1" | ||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" | ||
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== | ||
fill-range@^7.1.1: | ||
version "7.1.1" | ||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" | ||
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== | ||
dependencies: | ||
to-regex-range "^5.0.1" | ||
|
||
fill-range@^7.1.1: | ||
version "7.1.1" | ||
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" | ||
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== | ||
dependencies: | ||
to-regex-range "^5.0.1" | ||
|
||
|
@@ -3592,11 +3606,11 @@ methods@~1.1.2: | |
integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== | ||
|
||
micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5: | ||
version "4.0.5" | ||
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" | ||
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== | ||
version "4.0.8" | ||
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" | ||
integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== | ||
dependencies: | ||
braces "^3.0.2" | ||
braces "^3.0.3" | ||
picomatch "^2.3.1" | ||
|
||
[email protected]: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,7 @@ describe('API Key Interceptors', () => { | |
packageName: 'my-lil-website' | ||
}); | ||
expect(response.config.headers['Api-Key']).toBe('123'); | ||
expect(response.config.headers['Authorization']).toBe( | ||
expect(response.config.headers.Authorization).toBe( | ||
`Bearer ${MOCK_JWT_KEY}` | ||
); | ||
}); | ||
|
@@ -125,7 +125,7 @@ describe('API Key Interceptors', () => { | |
packageName: 'my-lil-website' | ||
}); | ||
expect(response.config.headers['Api-Key']).toBe('123'); | ||
expect(response.config.headers['Authorization']).toBe( | ||
expect(response.config.headers.Authorization).toBe( | ||
`Bearer ${MOCK_JWT_KEY}` | ||
); | ||
}); | ||
|
@@ -230,8 +230,8 @@ describe('API Key Interceptors', () => { | |
await updateUserEmail('[email protected]'); | ||
|
||
jest.advanceTimersByTime(60000 * 4.1); | ||
/* | ||
called once originally, a second time after the email was changed, | ||
/* | ||
called once originally, a second time after the email was changed, | ||
and a third after the JWT was about to expire | ||
*/ | ||
expect(mockGenerateJWT).toHaveBeenCalledTimes(3); | ||
|
@@ -279,8 +279,8 @@ describe('API Key Interceptors', () => { | |
}); | ||
|
||
jest.advanceTimersByTime(60000 * 4.1); | ||
/* | ||
called once originally, a second time after the email was changed, | ||
/* | ||
called once originally, a second time after the email was changed, | ||
and a third after the JWT was about to expire | ||
*/ | ||
expect(mockGenerateJWT).toHaveBeenCalledTimes(3); | ||
|
@@ -313,8 +313,8 @@ describe('API Key Interceptors', () => { | |
}); | ||
|
||
jest.advanceTimersByTime(60000 * 4.1); | ||
/* | ||
called once originally, a second time after the email was changed, | ||
/* | ||
called once originally, a second time after the email was changed, | ||
and a third after the JWT was about to expire | ||
*/ | ||
expect(mockGenerateJWT).toHaveBeenCalledTimes(3); | ||
|
@@ -671,19 +671,6 @@ describe('User Identification', () => { | |
expect(response.config.params.email).toBeUndefined(); | ||
expect(response.config.params.userId).toBe('999'); | ||
}); | ||
|
||
it('should try /users/update 0 times if request to create a user fails', async () => { | ||
mockRequest.onPost('/users/update').reply(400, {}); | ||
|
||
const { setUserID } = initialize('123'); | ||
await setUserID('999'); | ||
|
||
expect( | ||
mockRequest.history.post.filter( | ||
(e: any) => !!e.url?.match(/users\/update/gim) | ||
).length | ||
).toBe(1); | ||
}); | ||
}); | ||
}); | ||
|
||
|
@@ -1075,7 +1062,7 @@ describe('User Identification', () => { | |
packageName: 'my-lil-website' | ||
}); | ||
expect(response.config.headers['Api-Key']).toBe('123'); | ||
expect(response.config.headers['Authorization']).toBe( | ||
expect(response.config.headers.Authorization).toBe( | ||
`Bearer ${MOCK_JWT_KEY}` | ||
); | ||
}); | ||
|
@@ -1092,7 +1079,7 @@ describe('User Identification', () => { | |
packageName: 'my-lil-website' | ||
}); | ||
expect(response.config.headers['Api-Key']).toBe('123'); | ||
expect(response.config.headers['Authorization']).toBe( | ||
expect(response.config.headers.Authorization).toBe( | ||
`Bearer ${MOCK_JWT_KEY}` | ||
); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.