AuthorizationCodeFlow
Encapsulates the behavior required to authenticate using the OIDC Authorization Code flow with PKCE.
Call start to obtain an AuthorizationCodeFlowContext whose AuthorizationCodeFlowContext.url you open with a BrowserRedirectHandler. Once the browser redirects back to the registered redirect URI, pass that captured URI along with the same AuthorizationCodeFlowContext to resume to exchange the authorization code for tokens.
Types
Thrown by resume when no authorization code is present in the redirect URI.
Common base for the two exceptions start throws when Pushed Authorization Requests (PAR) cannot be completed. Catch this type to handle "PAR didn't work" generically, or catch the specific subtype (PushedAuthorizationRequiredException or PushedAuthorizationRequestException) to distinguish a server-mandated failure from an optional one.
Thrown by start when PAR is optional, the PAR request fails, and OAuth2Client.configuration's allowPushedAuthorizationRequestFallback is disabled.
Thrown by start when PAR is required by the authorization server (require_pushed_authorization_requests) but cannot be used — either no PAR endpoint was discovered, or the PAR request itself failed and fallback is not applicable because the server mandates PAR.
Thrown by resume when the redirect URI scheme does not match the configured redirect URL.
Thrown by resume when the redirect could not be validated or the authorization server returned an error.
Properties
Functions
Completes the Authorization Code redirect flow by exchanging the authorization code for tokens.
Resumes the Authorization Code flow using an Android android.net.Uri.
Initiates the Authorization Code redirect flow.