Documentation
¶
Overview ¶
Package auth implements the OAuth 2.0 Device Authorization Grant (RFC 8628) over OIDC discovery: discover the issuer's endpoints, request a device code, prompt the user to approve in a browser, then poll for the token. One code path serves any OIDC provider with discovery and the device grant — e.g. Keycloak or Okta for self-hosted, Auth0 for DBOS-managed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Issuer string
ClientID string
Audience string // optional; Auth0 requires it, Keycloak ignores it
Scopes []string // e.g. "openid", "offline_access"
HTTPClient *http.Client
}
Config configures a device-flow login.
type DeviceAuth ¶
type DeviceAuth struct {
DeviceCode string
UserCode string
VerificationURI string
VerificationURIComplete string
ExpiresIn int
Interval int
}
DeviceAuth is what the user must act on to approve the login.
Click to show internal directories.
Click to hide internal directories.