feat: add jwt package

This commit is contained in:
Derrick Hammer 2023-05-04 04:13:53 -04:00
parent aaa2c17212
commit ea99108327
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 20 additions and 0 deletions

20
jwt/jwt.go Normal file
View File

@ -0,0 +1,20 @@
package jwt
import (
"github.com/kataras/iris/v12/middleware/jwt"
_ "github.com/kataras/iris/v12/middleware/jwt"
)
var (
Secret = []byte("signature_hmac_secret_shared_key")
v *jwt.Verifier
)
func init() {
v = jwt.NewVerifier(jwt.HS256, Secret)
v.WithDefaultBlocklist()
}
func Get() *jwt.Verifier {
return v
}