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 fromVirgilCryptoDeclaration
Swift
@objc public init(apiKey: VirgilPrivateKey, apiPublicKeyIdentifier: String, crypto: VirgilCrypto, appId: String, ttl: TimeInterval = JwtGenerator.defaultTtl) throwsParameters
apiKeyApi Private Key for signing generated tokens
apiPublicKeyIdentifierPublic Key identifier of Api Key
cryptoVirgilCrypto
appIdApplication Id
ttlLifetime of generated tokens
JwtGenerator Class Reference