Skip to content

Commit

Permalink
Update example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Sanches committed Mar 6, 2019
1 parent 333e196 commit c8e4a92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,11 @@ var (
h jwt.Header
p CustomPayload
)
if err = raw.Decode(&h, &p); err != nil {
if h, err = raw.Decode(&p); err != nil {
// Handle error.
}
fmt.Println(h.Algorithm)
fmt.Println(h.KeyID)

iatValidator := jwt.IssuedAtValidator(now)
expValidator := jwt.ExpirationTimeValidator(now, true)
Expand Down

0 comments on commit c8e4a92

Please sign in to comment.