Skip to content
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

Add SSLContext arg to aiohttp adapter #483

Merged
merged 8 commits into from
Feb 7, 2025

Conversation

cwtravis
Copy link
Contributor

@cwtravis cwtravis commented Feb 6, 2025

Pass an SSLContext to the aiohttp adapter to create a valid SSL endpoint for OAuth callback.

Description

I needed the built-in aiohttp adapter to provide an SSL configuration so I could do OAuth with a callback without proxying my traffic through nginx. This can be done by passing an SSLContext object to the constructor of web.TCPSite.

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
    • I have updated the changelog with a quick recap of my changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)
  • I have read and agree to the Developer Certificate of Origin for this contribution

Pass an SSLContext to the aiohttp adapter to create a valid SSL endpoint for OAuth callback.
@chillymosh
Copy link
Collaborator

Please see the type coverage issues and the contribution agreement in the checklist.

It should also be considered to add the equivalent to startlette_adapter to maintain parity.

twitchio/web/aio_adapter.py Outdated Show resolved Hide resolved
@cwtravis
Copy link
Contributor Author

cwtravis commented Feb 6, 2025

Please see the type coverage issues and the contribution agreement in the checklist.

It should also be considered to add the equivalent to startlette_adapter to maintain parity.

I agreed to the contribution agreement. The starlette_adapter should also get the same pass through but I'm unfamiliar with starlette and would have to do some research. I also added the suggested help text from @EvieePy

Copy link
Contributor Author

@cwtravis cwtravis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the text to reflect what you suggested.

twitchio/web/aio_adapter.py Outdated Show resolved Hide resolved
twitchio/web/aio_adapter.py Outdated Show resolved Hide resolved
@EvieePy
Copy link
Member

EvieePy commented Feb 7, 2025

Thanks LGTM 👍

@EvieePy EvieePy merged commit 69e95e9 into PythonistaGuild:main Feb 7, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants