From 43c48aef176a14245744807ec60659f6f3a6814e Mon Sep 17 00:00:00 2001 From: James Read Date: Mon, 15 Apr 2024 01:01:30 +0100 Subject: [PATCH] feature: Renamed authJwtSecret to authJwtHmacSecret (#271) * feature: Renamed authJwtSecret to authJwtHmacSecret * feature: rename authJwtSecret --- internal/config/config.go | 2 +- internal/httpservers/restapi_auth_jwt.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index 5062a73..d3ed735 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -93,7 +93,7 @@ type Config struct { AuthJwtAud string AuthJwtDomain string AuthJwtCertsURL string - AuthJwtSecret string // mutually exclusive with pub key config fields + AuthJwtHmacSecret string // mutually exclusive with pub key config fields AuthJwtClaimUsername string AuthJwtClaimUserGroup string AuthJwtPubKeyPath string // will read pub key from file on disk diff --git a/internal/httpservers/restapi_auth_jwt.go b/internal/httpservers/restapi_auth_jwt.go index f10772c..056d020 100644 --- a/internal/httpservers/restapi_auth_jwt.go +++ b/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 []byte(cfg.AuthJwtSecret), nil + return []byte(cfg.AuthJwtHmacSecret), nil }) }