JSONWebToken.swift icon indicating copy to clipboard operation
JSONWebToken.swift copied to clipboard

Problem

Open obozhdi opened this issue 7 years ago • 1 comments

screen shot 2017-12-30 at 21 12 43

Just a simple method in 2 different projects. First working fine, second wont compile. Any ideas?

obozhdi avatar Dec 30 '17 19:12 obozhdi

You need to encapsulate your claims using the ClaimSet struct.

return JWT.encode(claims: ClaimSet(claims: [...],
   algorithm: .hs256("SOME SECRET STRING".data(using: .utf8)!)

guykogus avatar Jan 18 '18 08:01 guykogus