pywry.auth.callback_server¶
Local HTTP callback server for OAuth2 redirect handling in native mode.
OAuthCallbackServer¶
pywry.auth.callback_server.OAuthCallbackServer
¶
Ephemeral localhost HTTP server for capturing OAuth2 redirects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
host
|
str
|
Bind address (default |
'127.0.0.1'
|
port
|
int
|
Port number ( |
0
|
Initialize the callback server.
Attributes¶
redirect_uri
property
¶
Get the redirect URI for this callback server.
Returns:
| Type | Description |
|---|---|
str
|
The full redirect URI (e.g. |
Functions¶
start
¶
Start the callback server on a daemon thread.
Returns:
| Type | Description |
|---|---|
str
|
The redirect URI to use with the OAuth2 provider. |
wait_for_callback
¶
Block until the callback is received or timeout expires.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
timeout
|
float
|
Maximum seconds to wait (default 120). |
120.0
|
Returns:
| Type | Description |
|---|---|
dict or None
|
Callback parameters ( |