Skip to content

Auth URL Variables #2322

Open
Open
@michaelmerrill

Description

@michaelmerrill

Currently we can set the server variables for different environments like so:

servers:
  - url: 'https://{environment}.example.com/v1'
    variables:
      environment:
        default: api
        enum:
          - api
          - sandbox.api
          - development.api
          - staging.api

Is it possible to also set variables for the authorization code urls? Normally you'd want to match these environments when authenticating. I'd imagine it would look something like this:

securitySchemes:
  OAuth2:
    type: oauth2
    flows:
      authorizationCode:
        authorizationUrl: 
          - url: 'https://{environment}.example.com/authorize'
            variables:
              environment:
                default: accounts
                enum:
                  - accounts
                  - sandbox.accounts
                  - development.accounts
                  - staging.accounts
        tokenUrl: 
          - url: 'https://{environment}.example.com/token'
            variables:
              environment:
                default: accounts
                enum:
                  - accounts
                  - sandbox.accounts
                  - development.accounts
                  - staging.accounts

Metadata

Metadata

Assignees

No one assigned

    Labels

    securitysecurity: configThe mechanics of severs and structure of security-related objects

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions