-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsecurity.out
19 lines (17 loc) · 967 Bytes
/
security.out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- shows the JWT security scheme
select jsonb_pretty(get_openapi_document('{test}')->'components'->'securitySchemes'->'JWT');
jsonb_pretty
--------------------------------------------------------------------------------------------
{ +
"type": "http", +
"scheme": "bearer", +
"description": "Adds the JSON Web Token to the `Authorization: Bearer <JWT>` header.",+
"bearerFormat": "JWT" +
}
(1 row)
-- lists the JWT scheme as a security requirement object
select get_openapi_document('{test}')->'security' <@ '[{"JWT": []}]'::jsonb as has_jwt;
has_jwt
---------
t
(1 row)