OAI / OAI/sig-security

Auth URL Variables

Open
#33 3 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
6
Forks
3
Avg merge
1h 54m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing server variables model and the OAuth2 authorizationCode flow described in the issue. Compare how authorizationUrl and tokenUrl are represented, then determine the supported schema for environment variables and define the expected behavior for the proposed syntax.

Written by the indexing model from the issue text.

Assessment

Domain
api, authentication, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.