mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
chore(code): replace interface{} with any EE-6513 (#11986)
This commit is contained in:
parent
9c4935286f
commit
f0d43f941f
66 changed files with 231 additions and 231 deletions
|
@ -111,7 +111,7 @@ func (service *Service) GenerateToken(data *portainer.TokenData) (string, time.T
|
|||
func (service *Service) ParseAndVerifyToken(token string) (*portainer.TokenData, error) {
|
||||
scope := parseScope(token)
|
||||
secret := service.secrets[scope]
|
||||
parsedToken, err := jwt.ParseWithClaims(token, &claims{}, func(token *jwt.Token) (interface{}, error) {
|
||||
parsedToken, err := jwt.ParseWithClaims(token, &claims{}, func(token *jwt.Token) (any, error) {
|
||||
if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
|
||||
msg := fmt.Errorf("unexpected signing method: %v", token.Header["alg"])
|
||||
return nil, msg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue