WebAuthentication

constructor(oAuth2Client: OAuth2Client, webAuthenticationProvider: WebAuthenticationProvider = DefaultWebAuthenticationProvider(EventCoordinator(emptyList())))

Initializes a web authentication client backed by a KMP OAuth2Client.

This is the preferred constructor. The KMP client is used directly to create the underlying AuthorizationCodeFlow and RedirectEndSessionFlow.

Parameters

oAuth2Client

the KMP OAuth2Client to use for authorization requests.

webAuthenticationProvider

the WebAuthenticationProvider which will be used to show the UI when performing the redirect flows.


constructor(webAuthenticationProvider: WebAuthenticationProvider = DefaultWebAuthenticationProvider(OidcConfiguration.default.eventCoordinator))

Deprecated

Use the constructor taking com.okta.authfoundation.client.kmp.OAuth2Client instead.

Replace with

import com.okta.authfoundation.client.kmp.OAuth2Client
WebAuthentication(kmpClient, webAuthenticationProvider)

Initializes a web authentication client.

Parameters

webAuthenticationProvider

the WebAuthenticationProvider which will be used to show the UI when performing the redirect flows.


constructor(oidcConfiguration: OidcConfiguration, webAuthenticationProvider: WebAuthenticationProvider = DefaultWebAuthenticationProvider(oidcConfiguration.eventCoordinator))

Deprecated

Use the constructor taking com.okta.authfoundation.client.kmp.OAuth2Client instead.

Replace with

import com.okta.authfoundation.client.kmp.OAuth2Client
WebAuthentication(kmpClient, webAuthenticationProvider)

Initializes a web authentication client.

Parameters

oidcConfiguration

the OidcConfiguration specifying the authorization servers.

webAuthenticationProvider

the WebAuthenticationProvider which will be used to show the UI when performing the redirect flows.


constructor(client: OAuth2Client, webAuthenticationProvider: WebAuthenticationProvider = DefaultWebAuthenticationProvider(client.configuration.eventCoordinator))

Deprecated

Use the constructor taking com.okta.authfoundation.client.kmp.OAuth2Client instead.

Replace with

import com.okta.authfoundation.client.kmp.OAuth2Client
WebAuthentication(kmpClient, webAuthenticationProvider)

Initializes a web authentication client backed by an Android-only OAuth2Client.

Parameters

client

the Android OAuth2Client to use for authorization requests.

webAuthenticationProvider

the WebAuthenticationProvider which will be used to show the UI when performing the redirect flows.