Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem #97

Open
obozhdi opened this issue Dec 30, 2017 · 1 comment
Open

Problem #97

obozhdi opened this issue Dec 30, 2017 · 1 comment

Comments

@obozhdi
Copy link

obozhdi commented Dec 30, 2017

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?

@guykogus
Copy link

guykogus commented Jan 18, 2018

You need to encapsulate your claims using the ClaimSet struct.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants