OpenGithubs / OpenGithubs/weekly
【开源自荐】go-jwt 是一个 go 实现的 JWT 库
Open
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 1.7k
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
-
项目名称:
go-events -
项目简介 (100 字以内):
go-jwt 是一个 go 实现的 JWT 库 -
使用示例:
package main
import (
"fmt"
"github.com/deatil/go-jwt/jwt"
)
func main() {
claims := map[string]string{
"aud": "example.com",
"sub": "foo",
}
key := []byte("test-key")
s := jwt.SigningMethodHMD5.New()
tokenString, err := s.Sign(claims, key)
if err != nil {
fmt.Printf("Sign: %s \n", err.Error())
}
fmt.Printf("Signed: %s \n", tokenString)
p := jwt.SigningMethodHMD5.New()
parsed, err := p.Parse(tokenString, key)
if err != nil {
fmt.Printf("Parse: %s \n", err.Error())
}
claims2, err := parsed.GetClaims()
if err != nil {
fmt.Printf("GetClaims: %s \n", err.Error())
}
aud := claims2["aud"].(string)
fmt.Printf("Parseed aud: %s \n", aud)
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue contains a Go project description and usage example but names no file, test, or requested repository change. First check the weekly issue or publishing workflow and whether submissions are still accepted; done would require an explicit editorial placement or other maintainer-defined action.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- content
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100