Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gogf/gf-jwt
GoFrame HTTP JWT middleware.
https://github.com/gogf/gf-jwt
gf-jwt gf-plugin goframe golang-library golang-package jwt middleware
Last synced: 19 days ago
JSON representation
GoFrame HTTP JWT middleware.
- Host: GitHub
- URL: https://github.com/gogf/gf-jwt
- Owner: gogf
- License: mit
- Created: 2019-03-14T12:45:34.000Z (almost 6 years ago)
- Default Branch: v2
- Last Pushed: 2024-11-04T23:30:43.000Z (about 1 month ago)
- Last Synced: 2024-11-10T07:39:56.800Z (about 1 month ago)
- Topics: gf-jwt, gf-plugin, goframe, golang-library, golang-package, jwt, middleware
- Language: Go
- Homepage: https://goframe.org
- Size: 3.6 MB
- Stars: 116
- Watchers: 8
- Forks: 44
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gf - gf-jwt - GoFrame HTTP JWT middleware. (Libraries and Plugins)
README
# THIS REPOSITORY IS NO LONGER MAINTANED
The new repository can be found at: https://github.com/golang-jwt/jwt
# gf-jwt v2
This is a middleware for Gf framework.
It uses jwt-go to provide a jwt authentication middleware. It provides additional handler functions to provide the login api that will generate the token and an additional refresh handler that can be used to refresh tokens.
## Use
Download and install
```sh
$ go get github.com/gogf/gf-jwt/v2
```Import
```go
import "github.com/gogf/gf-jwt/v2"
```![login](screenshot/1.png)
![check user info](screenshot/2.png)
![refresh token](screenshot/3.png)
![logout](screenshot/4.png)
![check user info again](screenshot/5.png)