auth:Go库,用于生成JWT令牌,授权HTTP请求等

时间:2021-05-25 19:00:51
【文件属性】:
文件名称:auth:Go库,用于生成JWT令牌,授权HTTP请求等
文件大小:24KB
文件格式:ZIP
更新时间:2021-05-25 19:00:51
go golang helm chartmuseum Go chartmuseum / auth Go库,用于生成 JWT令牌,授权HTTP请求等。 如何使用 生成JWT令牌(示例) 克隆此go run testcmd/getjwt/main.go并运行go run testcmd/getjwt/main.go来运行此示例 package main import ( "fmt" "time" cmAuth "github.com/chartmuseum/auth" ) func main () { // This should be the private key associated with the public key used // in ChartMuseum server configuration (server.pem) cmTokenGenerator , err := cmAuth . NewTokenGener
【文件预览】:
auth-main
----.gitignore(264B)
----go.mod(172B)
----Makefile(303B)
----token_test.go(3KB)
----testcmd()
--------authorizer()
--------getjwt()
--------decodejwt()
----LICENSE(11KB)
----go.sum(1KB)
----testdata()
--------server.key(2KB)
--------server.pem(1KB)
----.github()
--------workflows()
--------dependabot.yml(109B)
----README.md(7KB)
----util.go(3KB)
----token.go(3KB)
----authorization_test.go(15KB)
----authorization.go(5KB)

网友评论