feat: add jwt package
This commit is contained in:
parent
aaa2c17212
commit
ea99108327
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue