login

fun login(requestCode: Int, context: Context, listener: DSAuthenticationListener?, email: String? = null, userAccountId: String? = null)

This function helps the user to login, using Account Server in a WebView.

Parameters

requestCode

This code will be returned in onActivityResult() if the calling activity exits

context

Context of the calling Activity

listener

DSAuthenticationListener which states whether authentication process is successful or not.

email

An optional email address of the user can allow bypassing the first step of entering the email in the login flow

userAccountId

If specified, the user will be logged in to that account. Otherwise, it will always login with the default account.


fun login(accessToken: String, refreshToken: String?, expiresIn: Int, context: Context, listener: DSAuthenticationListener, userAccountId: String? = null)

This function helps the user to login, using an access token obtained by the containing app.

Parameters

accessToken

The access token.

refreshToken

If the access token can be refreshed, the refresh token. Optional.

expiresIn

The number of seconds from the time the access token was provisioned to when it will expire. Should be a positive number.

context

Context of the calling Activity

listener

DSAuthenticationListener which states whether authentication process is successful or not.

userAccountId

If specified, the user will be logged in to that account. Otherwise, it will always login with the default account.