improvement: clear auth information from memory when logging out (#5316)

* clears authentications when logout is clicked

* tests the headers sent in the network request

* adds test for multiple api keys

* refactors tests to extract common uses

* correct test message description

Co-authored-by: kyle shockey <kyleshockey@gmail.com>
This commit is contained in:
Simon Legg
2020-01-15 03:20:39 +01:00
committed by kyle shockey
parent 44acf85d0d
commit c9d6ac4cfc
3 changed files with 150 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
openapi: 3.0.0
info:
title: Demo API
description: First test
termsOfService: 'http://demo.io/terms-of-service/'
contact:
name: Demo Support
email: support@demo.io
version: 1.0.0
paths:
/4641_1:
get:
summary: Returns a 200
security:
- api_key_1: []
responses:
'200':
description: A 200
content:
application/text:
schema:
type: string
/4641_2:
get:
summary: Returns a 200
security:
- api_key_1: []
- api_key_2: []
responses:
'200':
description: A 200
content:
application/text:
schema:
type: string
components:
securitySchemes:
api_key_1:
type: apiKey
name: api_key_1
in: header
api_key_2:
type: apiKey
name: api_key_2
in: header