TokenAuthenticator

class TokenAuthenticator(isFedRAMP: Boolean = false) : Authenticator

A custom Access Token based authentication strategy is to be used to authenticate with an application provided access token.

Since

3.2.0

Constructors

Link copied to clipboard
fun TokenAuthenticator(isFedRAMP: Boolean = false)

Functions

Link copied to clipboard
fun authorize(    accessToken: String,     expiryInSeconds: Int?,     handler: CompletionHandler<Void>)

Sets the token on the authorization strategy, overriding any existing access token.

Link copied to clipboard
open override fun deauthorize(handler: CompletionHandler<Void>?)

Deauthorizes the current user and clears any persistent state with regards to the current user. If the com.ciscowebex.androidsdk.phone.Phone is registered, it should be deregistered before calling this method.

Link copied to clipboard
open override fun getToken(handler: CompletionHandler<String?>)

Returns an access token of this authenticator.

Link copied to clipboard
open override fun isAuthorized(): Boolean

Returns True if the user is logically authorized.

Link copied to clipboard
fun setOnTokenExpiredListener(callback: CompletionHandler<Void>)

The callback handler when auth token has expired. The user will also be automatically signed out before this is called. When a token expires, new instances of Webex and Authenticator need to be created and used with a new token.