Skip to content

Get claims of JWT token #180

Answered by vearutop
flashpixx asked this question in Q&A
Oct 2, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

I took an original example and updated it with your code.

// Originally from https://github.com/go-chi/jwtauth/blob/v5.1.1/_example/main.go.
//
// jwtauth example
//
// Sample output:
//
// [peter@pak ~]$ curl -v http://localhost:3333/
// *   Trying ::1...
// * Connected to localhost (::1) port 3333 (#0)
// > GET / HTTP/1.1
// > Host: localhost:3333
// > User-Agent: curl/7.49.1
// > Accept: */*
// >
// < HTTP/1.1 200 OK
// < Date: Tue, 13 Sep 2016 15:53:17 GMT
// < Content-Length: 17
// < Content-Type: text/plain; charset=utf-8
// <
// * Connection #0 to host localhost left intact
// welcome anonymous%
//
//
// [peter@pak ~]$ curl -v http://localhost:3333/admin
// *   Trying ::1...
// * C…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@flashpixx
Comment options

Answer selected by flashpixx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants