Client

class Client

Represents a client registered with Schibsted account.

Constructors

Link copied to clipboard
constructor(context: Context, configuration: ClientConfiguration, httpClient: OkHttpClient, logoutCallback: () -> Unit? = null)

Functions

Link copied to clipboard
fun getAuthenticationIntent(context: Context, state: String? = null, authRequest: AuthRequest = AuthRequest()): Intent

Start login flow.

Link copied to clipboard
fun getExternalId(pairId: String, externalParty: String, optionalSuffix: String = ""): String?

Get externalId represented as SHA-256 of given pair id, external party and optionalSuffix (if provided).

Link copied to clipboard

Returns state of current login session.

Link copied to clipboard

Call this with the intent received via deep link to complete the login flow.

Link copied to clipboard
fun launchAuth(context: Context, state: String?, authRequest: AuthRequest = AuthRequest())

Start auth activity manually.

Link copied to clipboard
suspend fun requestLoginPrompt(context: Context, supportFragmentManager: FragmentManager, isCancelable: Boolean = true): Boolean

Show native login prompt if user already has a valid session on device and if no user session is found in the app.

Link copied to clipboard

Resume any previously logged-in user session