universal-hashing-sha256
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"github.com/authorizerdev/authorizer/server/crypto"
|
||||
"github.com/authorizerdev/authorizer/server/memorystore"
|
||||
"github.com/gin-gonic/gin"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
)
|
||||
|
||||
// CreateAdminAuthToken creates the admin token based on secret key
|
||||
@@ -31,7 +30,7 @@ func GetAdminAuthToken(gc *gin.Context) (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
err = bcrypt.CompareHashAndPassword([]byte(token), []byte(adminSecret))
|
||||
err = crypto.VerifyPassword(token, adminSecret)
|
||||
|
||||
if err != nil {
|
||||
return "", fmt.Errorf(`unauthorized`)
|
||||
|
Reference in New Issue
Block a user