"""
This type stub file was generated by pyright.
"""

import tornado.web
from authlib.integrations.base_client import BaseApp, BaseOAuth, OAuth2Mixin, OpenIDMixin
from authlib.integrations.requests_client import OAuth2Session
from streamlit.web.server.authlib_tornado_integration import TornadoIntegration

class TornadoOAuth2App(OAuth2Mixin, OpenIDMixin, BaseApp):
    client_cls = OAuth2Session
    def load_server_metadata(self):
        """We enforce S256 code challenge method if it is supported by the server."""
        ...
    
    def authorize_redirect(self, request_handler: tornado.web.RequestHandler, redirect_uri=..., **kwargs): # -> None:
        """Create a HTTP Redirect for Authorization Endpoint.

        :param request_handler: HTTP request instance from Tornado.
        :param redirect_uri: Callback or redirect URI for authorization.
        :param kwargs: Extra parameters to include.
        :return: A HTTP redirect response.
        """
        ...
    
    def authorize_access_token(self, request_handler: tornado.web.RequestHandler, **kwargs): # -> dict[Any | str, Any]:
        """
        :param request_handler: HTTP request instance from Tornado.
        :return: A token dict.
        """
        ...
    


class TornadoOAuth(BaseOAuth):
    oauth2_client_cls = TornadoOAuth2App
    framework_integration_cls = TornadoIntegration
    def __init__(self, config=..., cache=..., fetch_token=..., update_token=...) -> None:
        ...
    


