Skip to main content

Module auth

Module auth 

Source
Expand description

Authentication handlers – login via password, OAuth, API key.

Discovers login methods from HTML, executes password-based login via HTTP (no browser needed for standard forms), and creates authenticated sessions.

Structs§

ConsentForm
A parsed consent form from an OAuth provider.
HtmlForm
A parsed HTML form with action URL and fields.
LoginFormField
A field in a login form.

Enums§

LoginMethod
Discovered login method for a site.
MfaType
Type of MFA challenge.
OAuthResult
Result of an HTTP-native OAuth flow.

Functions§

complete_oauth_consent
Complete an OAuth consent form by POSTing approval.
discover_login_method
Discover the login method for a site by fetching its homepage and login page.
handle_oauth_mfa
Submit an MFA code via form POST.
login_api_key
Create an API-key authenticated session (no network call needed).
login_bearer
Create a bearer-token authenticated session (no network call needed).
login_oauth_http
Attempt OAuth login via HTTP redirect chain (no browser).
login_password
Log in with username and password via HTML form POST.