redocly-cli icon indicating copy to clipboard operation
redocly-cli copied to clipboard

Add support for OAuth `clientCredential` and `password` flows in Respect

Open DmitryAnansky opened this issue 7 months ago • 0 comments

Is your feature request related to a problem? Please describe.

Respect support making API calls with Digest security scheme by using x-security extension. This type of authorization making similar double requests to the destination resource as OAuth clientCredential and password flows with some difference in algorithm of course.

Describe the solution you'd like

Support OAuth2 clientCredential and password flows in x-security extension without accessToken workaround:

components:
  securitySchemes:
    OAuth2Password:
      type: oauth2
      flows:
        password:
          tokenUrl: https://example.com/oauth/token
          scopes:
            read: Read access to protected resources
            write: Write access to protected resources
    OAuth2ClientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://example.com/oauth/token
          scopes:
            admin: Admin access to system
            read: Read-only access
x-security:
  scheme:
     type: oauth2
     flows:
        password:
          tokenUrl: https://example.com/oauth/token
          scopes:
            read: Read access to protected resources
            write: Write access to protected resources
  values:
    password: ..........
x-security:
  scheme:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://example.com/oauth/token
          scopes:
            admin: Admin access to system
            read: Read-only access
  values:
    username: .......
    password: ..........

DmitryAnansky avatar Jun 03 '25 18:06 DmitryAnansky