Check authentication from jwt on all routes
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
package jwtauth
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"os"
|
||||
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
)
|
||||
|
||||
func GenerateJwtToken(username string) (string, error) {
|
||||
var s string
|
||||
key, err := base64.URLEncoding.DecodeString(os.Getenv(getKeyVariableName()))
|
||||
key, err := GetJwtKey()
|
||||
if err != nil {
|
||||
return s, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user