Authenticator
public protocol Authenticator : AnyObject
A protocol for generic authentication strategies in Cisco Webex. Each authentication strategy is responsible for providing an accessToken used throughout this SDK.
Since
1.2.0-
Returns True if the user is logically authorized.
This may not mean the user has a valid access token yet, but the authentication strategy should be able to obtain one without further user interaction.
Since
1.2.0Declaration
Swift
var authorized: Bool { get }
-
Deauthorizes the current user and clears any persistent state with regards to the current user. After this method has been invoked, for continued usage, new instances of
Authenticator
andWebex
need to be created and usedSince
1.2.0Declaration
Swift
func deauthorize(completionHandler: (() -> Void)?)
Parameters
completionHandler
a closure to be executed when once deauthorization is complete.
-
Returns an access token of this
Authenticator
.This may involve long-running operations such as service calls, but may also return immediately. The application should not make assumptions about how quickly this completes. If the access token could not be retrieved then the completion handler will be called with nil.
Since
1.2.0Declaration
Swift
func accessToken(completionHandler: @escaping (_ accessToken: Result<String>) -> Void)
Parameters
completionHandler
a closure to be executed when completed, with the access token if successfully retrieved, otherwise nil.