question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Template paths in tokenUrl parameter of security definition

See original GitHub issue

I’m running into an issue with the spec.

https://github.com/swagger-api/validator-badge/issues/73

It seems that template paths are not allowed in the tokenUrl parameter of security definitions.

my use case is:

securityDefinitions:
  oauth2PasswordSecurity:
    type: oauth2
    flow: password
    tokenUrl: 'https://example.com/V2/user/{user_id}/oauth/token'

I’m not sure if it’s a bug in the 2.0 spec or a feature for next version. What would be the best way to deterministically describe template paths to clients ?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:42
  • Comments:30 (8 by maintainers)

github_iconTop GitHub Comments

12reactions
PierreFritschcommented, Mar 17, 2022

To formalize the implicit requirement appearing in @dkirrane’s and @anderson-marques’s comments:

For parameterizing the tokenUrl et al. in the OAuth Flow object, it would feel most natural to me to have a variables object there, which would be working like the Server Variable Object used to define the variables of the url in the Server object.

12reactions
halunggecommented, Aug 10, 2021

What is the state on this one? I think the templateing functionality really is need for multitenancy application and support of different environments both mentioned above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Security - First Steps - FastAPI
This dependency will provide a str that is assigned to the parameter token of the path operation function. FastAPI will know that it...
Read more >
OpenAPI - KICS
Open source solution for static code analysis of Infrastructure as Code. Finding security vulnerabilities, compliance issues, and infrastructure ...
Read more >
OpenAPI Specification - Version 3.0.3 - Swagger
Path templating refers to the usage of template expressions, delimited by curly braces ({}), to mark a section of a URL path as...
Read more >
OpenAPI Specification v3.0.3 | Introduction, Definitions, & More
Each template expression in the path MUST correspond to a path parameter that is included in the Path Item itself and/or in each...
Read more >
RFC 6749: The OAuth 2.0 Authorization Framework
Defining New Authorization Endpoint Response Types ........51 8.5. ... RFC 6749 OAuth 2.0 October 2012 Appendix A. Augmented Backus-Naur Form (ABNF) Syntax ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found