-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'jul/oidc-idp' into 'master'
Add authorization code verification method See merge request TankerHQ/sdk-js!1011
- Loading branch information
Showing
16 changed files
with
182 additions
and
15 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
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 |
---|---|---|
|
@@ -97,6 +97,7 @@ | |
"Firefox ESR", | ||
"node >= 18", | ||
"not IE 11", | ||
"not op_mini all", | ||
"not dead" | ||
], | ||
"nyc": { | ||
|
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
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
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 |
---|---|---|
|
@@ -40,6 +40,13 @@ describe('Tanker', () => { | |
{ passphrase: 12 }, | ||
{ passphrase: new Uint8Array(12) }, | ||
{ passphrase: '' }, | ||
{ oidcProviderId: '', oidcAuthorizationCode: 'code', oidcState: 'state' }, | ||
{ oidcProviderId: 'issuer', oidcAuthorizationCode: '', oidcState: 'state' }, | ||
{ oidcProviderId: 'issuer', oidcAuthorizationCode: 'code', oidcState: '' }, | ||
{ oidcProviderId: 'issuer', oidcAuthorizationCode: new Uint8Array(12), oidcState: 'state' }, | ||
{ oidcProviderId: 'issuer', oidcAuthorizationCode: 'code' }, | ||
{ oidcAuthorizationCode: 'code', oidcState: 'state' }, | ||
{ oidcProviderId: 'issuer', oidcState: 'state' }, | ||
{ email: '[email protected]', verificationCode: '12345678', passphrase: 'valid_passphrase' }, // only one method at a time! | ||
]; | ||
|
||
|
@@ -218,6 +225,14 @@ describe('Tanker', () => { | |
}); | ||
}); | ||
|
||
describe('authenticateWithIdP', () => { | ||
it('throws when tanker is STOPPED', async () => { | ||
// We are testing a private method (only public in client-browser) | ||
// eslint-disable-next-line no-underscore-dangle | ||
await expect(tanker._authenticateWithIdP('SomeBase64')).to.be.rejectedWith(PreconditionFailed); | ||
}); | ||
}); | ||
|
||
describe('enrollUser', () => { | ||
it('throws when tanker is not STOPPED', async () => { | ||
const illegalStatuses = [ | ||
|
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
Oops, something went wrong.