-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: depedencies update and TS support * feat: Authentic rewrite to use Jose * infra: build CJS and ESM module * fix: validate token without `Bearer` * fix: throw Boom errors for incorrect ISS * fix: show OIDC http request error message * test: added tests using Jest * test: further tests * fix: validate error instance instead of assertion * docs: update README references * ci: adding changeset release * test: add test for missing required claim * docs: changelog * fix: Removing the authentic export default option BREAKING CHANGE: Authentic doesn't have an default export anymore, services using this newer version will need to import `authentic` from authentic * text: fixed named import on test * fix: fix OIDC fetching for issuers with URLs with path * fix: make "aud" claim optional * fix: stop requiring any claims * feat: allow JWK URLs with custom ports * docs: update CHANGELOG.md
- Loading branch information
1 parent
908f3db
commit e0ab92a
Showing
29 changed files
with
16,068 additions
and
5,411 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
"@articulate/authentic": major | ||
--- | ||
|
||
Typescript refactor and replace `jsonwebtoken` and `jwks-rsa` in favor of `jose` | ||
|
||
The biggest change on this version is the replacement of [jsonwebtoken](https://github.com/auth0/node-jsonwebtoken) and [jwks-rsa](https://github.com/auth0/node-jwks-rsa) in favor of [jose](https://github.com/panva/jose). jose exports the same features the other two libraries offer, without adding the extra dependencies previously required (it has zero dependencies!). This change significantly decreases `@authentic` final bundle size, allowing it to also be used in Lambdas. | ||
|
||
Also, this new version doesn't export `authentic` as a default export anymore, apps using this new version will to import/require `{ authentic } from "@articulate/authentic"` instead. | ||
|
||
Before upgrading make sure your app uses the new expected `jwks` and `verify` options (which differ from the old ones). | ||
|
||
### Dual Export of ESM and CJS Bundles | ||
|
||
Starting with this new version, Authentic started exporting both an ECMAScript Module (ESM) bundle and a CommonJS (CJS) bundle. This means that applications utilizing either of these architectures can now choose the bundle that best suits their specific use case. |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.changeset | ||
.git* | ||
coverage | ||
dist | ||
node_modules |
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 |
---|---|---|
@@ -1,20 +1,24 @@ | ||
module.exports = { | ||
'env': { | ||
'es2017': true, | ||
'mocha': true, | ||
'node': true | ||
env: { | ||
es2020: true, | ||
node: true | ||
}, | ||
'extends': 'eslint:recommended', | ||
'parserOptions': { | ||
'sourceType': 'module' | ||
}, | ||
'rules': { | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
plugins: [ | ||
'@typescript-eslint' | ||
], | ||
root: true, | ||
rules: { | ||
'eol-last': ['error', 'always'], | ||
'indent': ['error', 2, { 'SwitchCase': 1 }], | ||
indent: ['error', 2, { 'SwitchCase': 1 }], | ||
'linebreak-style': ['error', 'unix'], | ||
'no-console': 'off', | ||
'no-trailing-spaces': 'error', | ||
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }], | ||
'semi': ['error', 'never'] | ||
quotes: ['error', 'single', { 'allowTemplateLiterals': true }], | ||
semi: ['error', 'never'] | ||
} | ||
} |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
*.log | ||
coverage | ||
.DS_Store | ||
/node_modules | ||
/.nyc_output | ||
.nyc_output | ||
coverage | ||
dist | ||
node_modules |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.