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

from typing import Any, TYPE_CHECKING, TypedDict
from streamlit.runtime.secrets import AttrDict

if TYPE_CHECKING:
    class ProviderTokenPayload(TypedDict):
        provider: str
        exp: int
        ...
    
    
class AuthCache:
    """Simple cache implementation for storing info required for Authlib."""
    def __init__(self) -> None:
        ...
    
    def get(self, key): # -> None:
        ...
    
    def set(self, key, value, expires_in): # -> None:
        ...
    
    def get_dict(self): # -> dict[Any, Any]:
        ...
    
    def delete(self, key): # -> None:
        ...
    


def is_authlib_installed() -> bool:
    """Check if Authlib is installed."""
    ...

def get_signing_secret() -> str:
    """Get the cookie signing secret from the configuration or secrets.toml."""
    ...

def get_secrets_auth_section() -> AttrDict:
    ...

def encode_provider_token(provider: str) -> str:
    """Returns a signed JWT token with the provider and expiration time."""
    ...

def decode_provider_token(provider_token: str) -> ProviderTokenPayload:
    """Decode the JWT token and validate the claims."""
    ...

def generate_default_provider_section(auth_section) -> dict[str, Any]:
    """Generate a default provider section for the 'auth' section of secrets.toml."""
    ...

def validate_auth_credentials(provider: str) -> None:
    """Validate the general auth credentials and auth credentials for the given
    provider.
    """
    ...

