JWTAuthenticator
public class JWTAuthenticator : Authenticator
A JSON Web Token (JWT) based authentication strategy is to be used to authenticate a guest user on Cisco Webex.
Since
1.2.0-
See
SeeAuthenticator.authorizedSince
1.2.0Declaration
Swift
public var authorized: Bool { get } -
Returns the expiration of the access token
Since
2.3.0Declaration
Swift
public var expiration: Date? { get } -
Creates a new JWT authentication strategy
Since
1.2.0Declaration
Swift
public init() -
Sets the JWT access token on the authorization strategy, overriting any existing access token.
Since
1.2.0Declaration
Swift
public func authorizedWith(jwt: String, completionHandler: @escaping (_ result: Result<Bool>) -> Void)Parameters
jwtThe new JSON Web Token to use. JWT should contain the
expfield to pass validationcompletionHandlerThe completionHandler that is invoked after authorization with a success boolean
-
See
See Authenticator.deauthorize() After this method has been invoked, for continued usage, new instances ofJWTAuthenticatorandWebexneed to be created and usedSince
1.2.0Declaration
Swift
public func deauthorize(completionHandler: (() -> Void)?) -
See
See Authenticator.accessToken(completionHandler:)Since
1.2.0Declaration
Swift
public func accessToken(completionHandler: @escaping (_ token: (Result<String>)) -> Void) -
Refresh the access token.
Since
1.4.0Declaration
Swift
public func refreshToken(completionHandler: @escaping (Result<String>) -> Void)Parameters
completionHandlera closure to be executed when completed, with the new access token if successfully retrieved, otherwise nil.
View on GitHub