-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to support OAuth2 Password flows? #562
Comments
Hi @jmg-duarte, you're right that there is no special code generated for OAuth2 flows yet, that's a missing feature: https://swiftpackageindex.com/apple/swift-openapi-generator/1.2.1/documentation/swift-openapi-generator/supported-openapi-features#OAuth-Flows-Object In the short term, we recommend folks implement a Long term, it'd be great to see a proposal of how to better support OAuth2 in the generated code. I don't think we've come up with a design yet, and we welcome the community proposing one (using our Proposal process). |
I'm doing a client though, would that work? |
Apologies, I took the above to mean you're writing the server. Yes, just replace |
Question
I'm currently developing an API that makes use of OAuth2 Password Flows and need to be able to authenticate to use it.
Currently, there is no OAuth2 specific code, but for my use case, merely allowing me to declare the
Authorization
header would already solve my issue. However, there is no way (that I know of) of declaring arbitrary headers on the generated code.I'm already modifying my OpenAPI schema to handle #558 (comment) but would appreciate more escape hatches on the Swift side.
To that end, I am keen on helping implementing the generation for either the escape hatch or the
Authorization
header on the presence of OAuth security schemes. Just tell me where to look into!The text was updated successfully, but these errors were encountered: