Constructs an Authorization Code request URI according to RFC 6749 Section 4.1.1.
The generated URI includes: * client_id * response_type (always "code") * redirect_uri * state (if provided) * scope (if provided)
:: a typeCtrl KGHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11
Modulehoauth2-2.15.2Haskell2010
Module implementing various OAuth2 flow types and their request/response handling. Provides support for:
Authorization Code Grant
Device Authorization Grant
PKCE Extension
Token Refresh
User Info Endpoints
Constructs an Authorization Code request URI according to RFC 6749 Section 4.1.1.
The generated URI includes: * client_id * response_type (always "code") * redirect_uri * state (if provided) * scope (if provided)
Constructs an Authorization Code request URI with PKCE support according to RFC 7636.
Returns both the authorization URI and the generated code verifier. The code verifier must be stored securely for later use in the token request.
Makes Device Authorization Request https://www.rfc-editor.org/rfc/rfc8628#section-3.1
Polls for a token using the device authorization flow.
This implements the polling mechanism described in RFC 8628 Section 3.5. Handles automatic retries and interval adjustments based on IdP responses.
pollDeviceTokenRequestInternal :: MonadIO m=> IdpApplication i DeviceAuthorizationApplication-> Manager-> DeviceCode-> Int-> ExceptT TokenResponseError m TokenResponsePolling Interval
Sends a token request according to RFC 6749 Section 4.1.3.
This is used for exchanging authorization codes, device codes, or other grant types for access tokens.
Makes a Refresh Token Request according to RFC 6749 Section 6.
Used to obtain a new access token using a refresh token.
Makes a standard request to the userinfo endpoint using GET method.
This is commonly used with OpenID Connect providers to fetch user profile information using an access token.
Makes a request to the userinfo endpoint using a custom HTTP method.
Some IdPs may require different HTTP methods (instead of GET) or custom headers for fetching user information. This function provides that flexibility.
conduitTokenRequestInternal :: (MonadIO m, HasClientAuthenticationMethod a, FromJSON b)=> IdpApplication i a-> ManagerHTTP connection manager.
-> PostBodyRequest body.
-> ExceptT TokenResponseError m bResponse as ByteString