apple / apple/swift-openapi-generator

How to support OAuth2 Password flows?

Open
#562 7 comments 0 reactions 0 assignees View on GitHub
kind/support status/triage
Dominant language
Swift
Stars
2k
Forks
182
Avg merge
13h 28m
Merged PRs (30d)
5

Description

### 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 https://github.com/apple/swift-openapi-generator/pull/558#issuecomment-2037603263 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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.