feat: add mutualTLS auth option (#9193)

Refs #8020 

Co-authored-by: Vladimír Gorej <vladimir.gorej@smartbear.com>
This commit is contained in:
Patryk Rosiak
2023-09-13 15:32:35 +02:00
committed by GitHub
parent 8db1226d1e
commit 89cdd7b022
13 changed files with 340 additions and 5 deletions

View 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")
})
})

View 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