-
Hi, I would like to know if openapi-python-client supports generating clients for Open API spec with OAUTH 1 authentication? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hey Sanjay 👋. There aren't any features that do oauth-specific things (yet). As far as auth, the only thing generated clients will have is an It would certainly be nice for us to generate more helpful code around OAuth, but I haven't yet figured out an ergonomic way to do that. If you have suggestions, I'd love to hear it! |
Beta Was this translation helpful? Give feedback.
-
Hey Dylan, |
Beta Was this translation helpful? Give feedback.
-
@dbanty Happy new year. Sorry for the delay. Just to update, replacing path parameters isn't a bug, issue was with the spec version. I was trying with swagger 2.0 version. Thanks. |
Beta Was this translation helpful? Give feedback.
Hey Sanjay 👋. There aren't any features that do oauth-specific things (yet). As far as auth, the only thing generated clients will have is an
AuthenticatedClient
which has atoken
attribute. Using that client will put a header in your requests like"Authorization": f"Bearer {token}"
which is pretty standard in OAuth, but not guaranteed to be what your service uses. You can also set headers and cookies yourself for whatever your service uses.It would certainly be nice for us to generate more helpful code around OAuth, but I haven't yet figured out an ergonomic way to do that. If you have suggestions, I'd love to hear it!