Explorar o código

feature: Renamed authJwtSecret to authJwtHmacSecret (#271)

* feature: Renamed authJwtSecret to authJwtHmacSecret

* feature: rename authJwtSecret
James Read %!s(int64=2) %!d(string=hai) anos
pai
achega
43c48aef17
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      internal/config/config.go
  2. 1 1
      internal/httpservers/restapi_auth_jwt.go

+ 1 - 1
internal/config/config.go

@@ -93,7 +93,7 @@ type Config struct {
 	AuthJwtAud                      string
 	AuthJwtAud                      string
 	AuthJwtDomain                   string
 	AuthJwtDomain                   string
 	AuthJwtCertsURL                 string
 	AuthJwtCertsURL                 string
-	AuthJwtSecret                   string // mutually exclusive with pub key config fields
+	AuthJwtHmacSecret               string // mutually exclusive with pub key config fields
 	AuthJwtClaimUsername            string
 	AuthJwtClaimUsername            string
 	AuthJwtClaimUserGroup           string
 	AuthJwtClaimUserGroup           string
 	AuthJwtPubKeyPath               string // will read pub key from file on disk
 	AuthJwtPubKeyPath               string // will read pub key from file on disk

+ 1 - 1
internal/httpservers/restapi_auth_jwt.go

@@ -90,7 +90,7 @@ func parseJwtTokenWithHMAC(jwtString string) (*jwt.Token, error) {
 			return nil, fmt.Errorf("parseJwt expected token algorithm HMAC but got: %v", token.Header["alg"])
 			return nil, fmt.Errorf("parseJwt expected token algorithm HMAC but got: %v", token.Header["alg"])
 		}
 		}
 
 
-		return []byte(cfg.AuthJwtSecret), nil
+		return []byte(cfg.AuthJwtHmacSecret), nil
 	})
 	})
 }
 }