Skip to content

How to use Google ReCaptcha as "security"Β #1995

Open
@NonPolynomial

Description

@NonPolynomial

Hi,

I have a path and have to secure it with either an API key or for browser clients with Google ReCaptcha, where the client recaptcha token is used within the request payload.

Payload

{
  "g-recaptcha-response": "recaptcha client token which has to be verified",
  // other payload data
}

OpenAPI YAML

openapi: 3.0.0

info:
  title: Test
  description: API
  version: 1.0.0

components:
  securitySchemes:
    ApiKey:
      type: apiKey
      name: X-Api-Key
      in: header

paths:
  /a/b/c:
    post:
      description: ABC
      security:
        - ApiKey: []
        - GoogleRecaptcha: [] # <--- how?!
      responses:
        "200":
          description: success
          content:
            application/json:
              example:
                status: ok

How do I define the security scheme for GoogleRecaptcha?

Metadata

Metadata

Assignees

No one assigned

    Labels

    securitysecurity: authAuthentication including overlap with authorization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions