feat: add PKCE support for OAuth2 Authorization Code flows (#5361)
* Add PKCE support. * Fix tests * Update oauth2.md * Rename usePkce * Fix the BrokenComponent error * Update oauth2.md * Remove isCode variable. Remove uuid4 dependency. * Remove utils functions * Import crypto * Fix tests * Fix the tests * Cleanup * Fix code_challenge generation * Move code challenge and verifier to utils for mocks. Update tests. * Mock the PKCE methods in the utils file properly. * Add missing expect * use target-method spies * Add comments to explain test values. * Get rid of jsrsasign.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const translator = require("./translator")
|
||||
const indent = require("./helpers").indent
|
||||
|
||||
const oauthBlockSchema = {
|
||||
const oauthBlockSchema = {
|
||||
OAUTH_CLIENT_ID: {
|
||||
type: "string",
|
||||
name: "clientId"
|
||||
@@ -26,6 +26,10 @@ const oauthBlockSchema = {
|
||||
OAUTH_ADDITIONAL_PARAMS: {
|
||||
type: "object",
|
||||
name: "additionalQueryStringParams"
|
||||
},
|
||||
OAUTH_USE_PKCE: {
|
||||
type: "boolean",
|
||||
name: "usePkceWithAuthorizationCodeGrant"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user