WIP: Develop #1
@@ -14,9 +14,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
signKey *rsa.PrivateKey
|
signKey *rsa.PrivateKey
|
||||||
publicSignKey *rsa.PublicKey
|
signMethod jwt.SigningMethod = jwt.SigningMethodRS256
|
||||||
signMethod jwt.SigningMethod = jwt.SigningMethodRS256
|
|
||||||
|
|
||||||
AuthMiddleware *ginJwt.GinJWTMiddleware
|
AuthMiddleware *ginJwt.GinJWTMiddleware
|
||||||
)
|
)
|
||||||
@@ -49,11 +48,6 @@ func Init() {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
publicSignKey, err = jwt.ParseRSAPublicKeyFromPEM(publicFile)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
AuthMiddleware = &ginJwt.GinJWTMiddleware{
|
AuthMiddleware = &ginJwt.GinJWTMiddleware{
|
||||||
SigningAlgorithm: signMethod.Alg(),
|
SigningAlgorithm: signMethod.Alg(),
|
||||||
PrivKeyBytes: privateFile,
|
PrivKeyBytes: privateFile,
|
||||||
|
|||||||
Reference in New Issue
Block a user