From e8d2b66d6f68e1cbb0692dfe20d2e98899c2109a Mon Sep 17 00:00:00 2001 From: Neil Schark <neil.schark@h-da.de> Date: Thu, 25 Jul 2024 12:22:12 +0000 Subject: [PATCH] fix linter --- controller/northbound/server/auth.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/controller/northbound/server/auth.go b/controller/northbound/server/auth.go index a10e7a49d..9924e5da4 100644 --- a/controller/northbound/server/auth.go +++ b/controller/northbound/server/auth.go @@ -155,7 +155,7 @@ func (s AuthServer) isCorrectPassword(storedPassword, salt, loginPassword string } // handleLogout checks if the provided user name matches with the one associated with token and -// removed the token from all tokens of the user +// removed the token from all tokens of the user. func (s AuthServer) handleLogout(ctx context.Context, userName string) error { md, ok := metadata.FromIncomingContext(ctx) if !ok { @@ -183,7 +183,10 @@ func (s AuthServer) handleLogout(ctx context.Context, userName string) error { foundToken := false for _, storedToken := range storedTokens { if storedToken == token { - storedUser.RemoveToken(token) + err := storedUser.RemoveToken(token) + if err != nil { + return status.Errorf(codes.Aborted, "error checking match of token provied for user") + } foundToken = true break } -- GitLab