AuthManager

class AuthManager

Functions

addSignInStateChangeListener
Link copied to clipboard
fun addSignInStateChangeListener(signInStateChangeListener: SignInStateChangeListener)

Register listener for SignInState changes and sign-out event

buildHeaders
Link copied to clipboard
fun buildHeaders(callback: BuildHeadersCallback)

Returns authentication headers for use in http communication with Sygic online services

getCurrentSignInState
Link copied to clipboard
fun getCurrentSignInState(): SignInState

Return current authentication type

login
Link copied to clipboard
fun login(authAccount: AuthAccount, loginCallback: LoginCallback)

Login as specific AuthAccount

logout
Link copied to clipboard
fun logout()

Logout - authentication data will be deleted

notifyAuthRejected
Link copied to clipboard
fun notifyAuthRejected()

Call this method when valid authentication headers were rejected by other services. AuthManager will try to refresh authentication data with next buildHeaders call

removeSignInStateChangeListener
Link copied to clipboard
fun removeSignInStateChangeListener(signInStateChangeListener: SignInStateChangeListener)

Unregister listener for SignInState changes and sign-out event

requestAuthenticationRefresh
Link copied to clipboard
fun requestAuthenticationRefresh()

Call this method when it is necessary to get latest authorization data. AuthManager will refresh authentication data with next buildHeaders call