TOTPCodeGenerator
public class TOTPCodeGenerator
Use this class to generate the TOTP code for a badge. The TOTP code is 6 digits. The duration of the TOTP code varies by the badge and can be configured on Usher Network Manager. A new code will be generated and published once the current code expires.
-
Designated initializer.
Seealso
TOTPCodeGeneratorDelegateDeclaration
Swift
public init(forBadge badge: Badge, delegate: TOTPCodeGeneratorDelegate)Parameters
forBadgeThe badge for which to generate TOTP code
delegateAn object that conforms to the
TOTPCodeGeneratorDelegateprotocol -
Start generation of TOTP Code. The TOTP code will be generated only if the badge has no active security restrictions.
Declaration
Swift
public func start() -
Stop the TOTP code generation. It is recommended that the generation be stopped when not required. e.g. code displaying view goes out of screen.
Declaration
Swift
public func stop()
TOTPCodeGenerator Class Reference