Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix: resovled lint errors
=44d8f8a7afba
diff --git a/backend-go/internal/services/auth/classify.go b/backend-go/internal/services/auth/classify.goindex ffd9bf1d23..11298b478a 100644--- a/backend-go/internal/services/auth/classify.go+++ b/backend-go/internal/services/auth/classify.go@@ -25,6 +25,15 @@ func ClassifyToken(token string) AuthMode {return AuthModeJWTcase AuthTokenTypeIdentityAccessToken:return AuthModeIdentityAccessToken+ case AuthTokenTypeRefreshToken,+ AuthTokenTypeSignupToken,+ AuthTokenTypeMfaToken,+ AuthTokenTypeProviderToken,+ AuthTokenTypeAPIKey,+ AuthTokenTypeServiceAccessToken,+ AuthTokenTypeServiceRefreshToken,+ AuthTokenTypeSCIMToken:+ return ""}return ""diff --git a/backend-go/internal/services/auth/handler.go b/backend-go/internal/services/auth/handler.goindex 67f6cb18b4..dc4130c179 100644--- a/backend-go/internal/services/auth/handler.go+++ b/backend-go/internal/services/auth/handler.go@@ -49,7 +49,7 @@ func (h AuthHandler) JWTAuth(ctx context.Context, token string, sc *security.JWTtokenMode := ClassifyToken(token)if tokenMode == "" {- return ctx, errutil.Unauthorized("You are not allowed to access this resource").WithErr(errors.New("Token classification failed"))+ return ctx, errutil.Unauthorized("You are not allowed to access this resource").WithErr(errors.New("token classification failed"))}// Map scheme name to expected auth mode.@@ -62,12 +62,12 @@ func (h AuthHandler) JWTAuth(ctx context.Context, token string, sc *security.JWTcase "service_token":expectedMode = AuthModeServiceTokendefault:- return ctx, errutil.Unauthorized("You are not allowed to access this resource").WithErr(errors.New("Invalid token"))+ return ctx, errutil.Unauthorized("You are not allowed to access this resource").WithErr(errors.New("invalid token"))}// Fast reject: token type doesn't match the scheme being tried.if tokenMode != expectedMode {- return ctx, errutil.Unauthorized("You are not allowed to access this resource").WithErr(fmt.Errorf("Provider token %v not support", tokenMode))+ return ctx, errutil.Unauthorized("You are not allowed to access this resource").WithErr(fmt.Errorf("provider token %v not supported", tokenMode))}var (