Table of Contents

TOidcClient.FinishAuthorize Method

Completes the authorization flow by processing the callback URL returned by the provider.

Remarks

For authorization code flows, this method exchanges the received code for tokens by calling the token endpoint. Raises EOidcClientError if the server returned an error, or EOidcClientException if the state cannot be matched or token validation fails.

Syntax

Unit: Sphinx.OidcClient

function TOidcClient.FinishAuthorize(const CallbackUrl: string): TAuthResult; overload;

Parameters

<-> Parameter Type Description
const CallbackUrl string The full redirect URL delivered to the application after the user authenticated, including all query or fragment parameters appended by the server.

Returns

A TAuthResult containing the tokens obtained from the provider. The caller is responsible for destroying the returned instance.

See also