Open SpacyRicochet opened 7 years ago
@SpacyRicochet Hi!
What are you looking for? Yes, deprecated method is fine now. In future it will be back. ( awesome phrase )
let payload: [AnyHashable:Any] = [:]
let secret = ""
let algorithm: JWTAlgorithm = JWTAlgorithmHSBase()
let value = JWTBuilder.encodePayload(payload).secret(secret)?.algorithm(algorithm)?.encode
Huh, weird. Somehow that failed to work for me spectacularly. But I might be doing something wrong or relying too much on code completion. Will get back to you on that ;)
@SpacyRicochet you could look at JWTDesktopSwift for JWT usage in Swift
I am having trouble understanding the syntax of JWTBuilder's method chaining in Swift.
What would be the equivalent in Swift 3.0 of this line in Objective-C?
Using the deprecated old method works fine, but I was wondering how to do this properly.