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 Example doens't return a token #99

Closed
shachardevops opened this issue Mar 8, 2021 · 3 comments
Closed

jwt Example doens't return a token #99

shachardevops opened this issue Mar 8, 2021 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@shachardevops
Copy link

What version of Go are you using (go version)?

1.13

Does this issue reproduce with the latest release?

yes

What version of Go-Guardian are you using?

latest

What did you do?

https://play.golang.org/p/NlbR34g1GRM
I just ran the jwt example

What did you expect to see?

I expect to get a token in the response

What did you see instead?

token:  
➜  ~ curl  -k http://127.0.0.1:8080/v1/book/1449311601 -u admin:admin
Author: Ryan Boyd 
➜  ~ curl  -k http://127.0.0.1:8080/v1/auth/token -u admin:admin
token:  
➜  ~ 

Token is empty

@shachardevops
Copy link
Author

Solved - you need to update the example .
replace Method: gojwt.SigningMethodHS256,
with Algorithm: jwt.HS256,

@shachardevops
Copy link
Author

You did a really good job here! Awesome project.

@shaj13
Copy link
Owner

shaj13 commented Mar 9, 2021

@shachardevops thx, I would love to see a PR.

@shaj13 shaj13 added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Mar 9, 2021
@shaj13 shaj13 reopened this Mar 9, 2021
@shaj13 shaj13 closed this as completed Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants