philapercivalth
2 years agoOccasional Visitor
Define bearerAuth in openAPI 2
Hi I have this security schema in OAS 3 that I'd like to translate to OAS 2, my understanding is that the security definition for bearAuth doesn't exist in OAS2 as
a standalone but it is included as Auth2.0 access token, I have an api that takes in a jwt token that includes some information about the user then makes a call to an authorisation gateway using a payload X, this is what the model looks like in OAS 3 (reason I want to do this is beacause I'm using https://github.com/swaggo/swag#security for generating swagger spec in go and it doesn't seem to directly support OAS 3):
security:
- bearerAuth: [ ]
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: jwt