Some checks failed
Node.js CI / build (push) Failing after 2s
Node.js CI / e2e-tests (+(a11y|security|bugs)/**/*cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/!(o|d|m)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/+(o|d)*.cy.js) (push) Failing after 2s
Node.js CI / e2e-tests (features/**/m*.cy.js) (push) Failing after 2s
CodeQL / Analyze (javascript) (push) Failing after 2m49s
Security scan for docker image / build (push) Failing after 42s
48 lines
1.5 KiB
JavaScript
Executable File
48 lines
1.5 KiB
JavaScript
Executable File
describe("Check client_secret for OAuth2 Authorization Code flow with and without PKCE (#6290)", () => {
|
|
it("should display client_secret field for authorization code flow with PKCE", () => {
|
|
cy.visit(
|
|
"/?url=/documents/features/auth-code-flow-pkce-without-secret.yaml"
|
|
)
|
|
.window()
|
|
.then(win => {
|
|
// set auth config to use PKCE
|
|
let authConfigs = win.ui.authSelectors.getConfigs()
|
|
win.ui.authActions.configureAuth({
|
|
...authConfigs,
|
|
usePkceWithAuthorizationCodeGrant: true,
|
|
})
|
|
})
|
|
.get("button.authorize")
|
|
.click()
|
|
.get("h4")
|
|
.contains("authorizationCode with PKCE")
|
|
.get(".flow")
|
|
.contains("authorizationCode with PKCE")
|
|
.get("#client_secret_authorizationCode")
|
|
.should("exist")
|
|
})
|
|
|
|
it("should display client_secret field for authorization code flow without PKCE", () => {
|
|
cy.visit(
|
|
"/?url=/documents/features/auth-code-flow-pkce-without-secret.yaml"
|
|
)
|
|
.window()
|
|
.then(win => {
|
|
// set auth config to not use PKCE
|
|
let authConfigs = win.ui.authSelectors.getConfigs()
|
|
win.ui.authActions.configureAuth({
|
|
...authConfigs,
|
|
usePkceWithAuthorizationCodeGrant: false,
|
|
})
|
|
})
|
|
.get("button.authorize")
|
|
.click()
|
|
.get("h4")
|
|
.contains("authorizationCode")
|
|
.get(".flow")
|
|
.contains("authorizationCode")
|
|
.get("#client_secret_authorizationCode")
|
|
.should("exist")
|
|
})
|
|
})
|