GeneratorJwtProvider
@objc(VSSGeneratorJwtProvider)
open class GeneratorJwtProvider : NSObject, AccessTokenProvider
Implementation of AccessTokenProvider which provides generated JWTs
-
JwtGeneretor for generating new tokens
Declaration
Swift
@objc public let jwtGenerator: JwtGenerator -
Identity that will be used for generating token if tokenContext do not have it (e.g. for read operations) WARNING: Do not create cards with defaultIdentity
Declaration
Swift
@objc public let defaultIdentity: String -
Additional data, that will be present in token
Declaration
Swift
@objc public let additionalData: [String : String]? -
Initializer
Declaration
Swift
@objc public init(jwtGenerator: JwtGenerator, defaultIdentity: String, additionalData: [String : String]? = nil)Parameters
jwtGeneratorJwtGeneratorinstance for generating new tokensdefaultIdentityIdentity that will be used for generating token if tokenContext do not have it (e.g. for read operations) WARNING: Do not create cards with defaultIdentity
additionalDataAdditional data, that will be present in token
-
Provides new generated JWT
Declaration
Swift
public func getToken(with tokenContext: TokenContext, completion: @escaping (AccessToken?, Error?) -> Void)Parameters
tokenContextTokenContext, provides context explaining why token is neededcompletioncompletion closure, called with access token or corresponding error
GeneratorJwtProvider Class Reference