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

JWT.encode({"exp": 10}, "secret") #52

Closed
rajgurung opened this issue Jan 13, 2015 · 2 comments
Closed

JWT.encode({"exp": 10}, "secret") #52

rajgurung opened this issue Jan 13, 2015 · 2 comments

Comments

@rajgurung
Copy link

This seems to be not working. I am using gem 'jwt', ~> 1.2.0

Error Message
SyntaxError: (irb):3: syntax error, unexpected ':'
JWT.encode({"exp": 10}, "ssss" )

@excpt
Copy link
Member

excpt commented Jan 13, 2015

This syntax is supported only by the latest ruby versions:

JWT.encode({"exp": 10}, "ssss" )

Try this syntax instead:

JWT.encode({"exp" => 10}, "ssss")

@rajgurung
Copy link
Author

Thanks that syntax worked perfectly!

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