Using an API Key & Secret for Swagger Security Scheme

Swagger 2.0 you can specify multiple API Key security definition and mark an operation to require multiple securities.
In following example, I'm using two API Key securities that should be presented in header of each request in order to get authenticated.
swagger: '2.0'
info:
  version: 0.0.0
  title: Simple API
securityDefinitions:
  key:
    type: apiKey
    in: header
    name: key
  value:
    type: apiKey
    in: header
    name: value
paths:
  /:
    get:
      security:
        - key: []
        - value: []
      responses:
        200:
          description: OK

0 pensamientos:

Post a Comment

feedback!