JwtGenerator
@objc(VSSJwtGenerator)
open class JwtGenerator : NSObject
Class responsible for JWT generation
-
Api Private Key for signing generated tokens
Note
Can be taken hereDeclaration
Swift
@objc public let apiKey: VirgilPrivateKey
-
Public Key identifier of Api Key
Declaration
Swift
@objc public private(set) var apiPublicKeyIdentifier: String { get }
-
Implementation of AccessTokenSigner for signing generated tokens
Declaration
Swift
@objc public let crypto: VirgilCrypto
-
Application Id
Note
Can be taken hereDeclaration
Swift
@objc public let appId: String
-
Lifetime of generated tokens
Declaration
Swift
@objc public let ttl: TimeInterval
-
Default JWT ttl
Declaration
Swift
@objc public static let defaultTtl: TimeInterval
-
Initializer
Throws
Rethrows fromVirgilCrypto
Declaration
Swift
@objc public init(apiKey: VirgilPrivateKey, apiPublicKeyIdentifier: String, crypto: VirgilCrypto, appId: String, ttl: TimeInterval = JwtGenerator.defaultTtl) throws
Parameters
apiKey
Api Private Key for signing generated tokens
apiPublicKeyIdentifier
Public Key identifier of Api Key
crypto
VirgilCrypto
appId
Application Id
ttl
Lifetime of generated tokens