Documentation for maplib/Auth.kt

data class Auth

Class for holding library authentication

fun constructor(url: String, authServerUrl: String, accessToken: String, updateToken: String, expiresIn: String, clientId: String, tokenUpdateFailedCallback: (() -> Unit)? = null)

Main constructor

Parameters
  • url – l The http request starting from this url will be authenticated.

  • authServerUrl – l Authentication server url. The update request will use this url.

  • accessToken – n Access token for oAuth2.

  • updateToken – n Update token for oAuth2.

  • expiresIn – n The token expires period.

  • clientId – d client Id for oAuth2 protocol.

  • tokenUpdateFailedCallback – k function executes if update failed.

val url : String

l The http request starting from this url will be authenticated.

fun options() : Map<String, String>

Get current authentication options. If some options changed via interaction with authentication server, this function returns actual values.

Returns

key-value dictionary of options