OAuthLogin

Configuration for useOAuth: the requested scopes, the loopback callback port (0 = an ephemeral OS-assigned loopback port), the token store (defaults to a FileTokenStore under the user's config dir), and the client-registration inputs.

Members

Functions

scopeString
string scopeString()

The scopes joined into a single space-delimited OAuth scope string.

Variables

authMethod
TokenEndpointAuthMethod authMethod;

How to authenticate at the token endpoint.

callbackPath
string callbackPath;

The loopback path the authorization server redirects to.

callbackPort
ushort callbackPort;

Loopback listener port for the redirect. 0 selects an ephemeral port.

callbackTimeout
Duration callbackTimeout;

Maximum time to wait for the authorization-server redirect to arrive on the loopback listener before aborting the interactive flow. Bounds the wait so an abandoned browser or an absent redirect cannot block the caller indefinitely.

clientId
string clientId;

A pre-registered client_id (skips DCR/CIMD when set).

clientIdMetadataUrl
string clientIdMetadataUrl;

SEP-991 OAuth Client ID Metadata Document URL (used as client_id when the AS advertises client_id_metadata_document_supported).

clientName
string clientName;

The human-readable client name used for Dynamic Client Registration.

clientSecret
string clientSecret;

A pre-registered client_secret (for confidential clients).

openBrowser
void delegate(string url) @(safe) openBrowser;

Opener for the system browser. Null => the platform default opener. Supplied explicitly in tests to avoid launching a browser.

scopes
string[] scopes;

OAuth scopes to request (space-joined into the scope parameter).

store
TokenStore store;

Pluggable token persistence. Null => a default FileTokenStore.