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: about 2 months 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 (over 5 years ago)
- Default Branch: v2
- Last Pushed: 2024-03-31T14:30:02.000Z (6 months ago)
- Last Synced: 2024-07-13T14:31:51.198Z (2 months ago)
- Topics: gf-jwt, gf-plugin, goframe, golang-library, golang-package, jwt, middleware
- Language: Go
- Homepage: https://goframe.org
- Size: 3.6 MB
- Stars: 113
- Watchers: 8
- Forks: 44
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gf - gf-jwt - GoFrame HTTP JWT middleware. (Libraries and Plugins)
README
# 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)