Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

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)