feat: add mutualTLS auth option (#9193)
Refs #8020 Co-authored-by: Vladimír Gorej <vladimir.gorej@smartbear.com>
This commit is contained in:
30
test/e2e-cypress/e2e/features/oas31-auth-mutual-tls.cy.js
Normal file
30
test/e2e-cypress/e2e/features/oas31-auth-mutual-tls.cy.js
Normal file
@@ -0,0 +1,30 @@
|
||||
describe("MutualTLS Authorization", () => {
|
||||
|
||||
it("should open authorization popup", () => {
|
||||
cy.visit(
|
||||
"/?url=/documents/security/mutual-tls.yaml"
|
||||
)
|
||||
.get("button.authorize")
|
||||
.click()
|
||||
.get(".auth-container h4")
|
||||
.contains("mutual (mutualTLS)")
|
||||
})
|
||||
it("should have description given by user", () => {
|
||||
cy.visit(
|
||||
"/?url=/documents/security/mutual-tls.yaml"
|
||||
)
|
||||
.get("button.authorize")
|
||||
.click()
|
||||
.get(".auth-container p:nth-of-type(2)")
|
||||
.contains("Mutual TLS description")
|
||||
})
|
||||
it("should not display Authorize or Logout buttons", () => {
|
||||
cy.visit(
|
||||
"/?url=/documents/security/mutual-tls.yaml"
|
||||
)
|
||||
.get("button.authorize")
|
||||
.click()
|
||||
.get(".auth-button-wrapper")
|
||||
.should("not.exist")
|
||||
})
|
||||
})
|
||||
10
test/e2e-cypress/static/documents/security/mutual-tls.yaml
Normal file
10
test/e2e-cypress/static/documents/security/mutual-tls.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
openapi: 3.1.0
|
||||
info:
|
||||
title: Test Mutual TLS authorization
|
||||
version: 1.0.0
|
||||
components:
|
||||
securitySchemes:
|
||||
mutual:
|
||||
type: mutualTLS
|
||||
description: Mutual TLS description
|
||||
name: mutual
|
||||
Reference in New Issue
Block a user