Skip to content
Snippets Groups Projects
Commit e8d2b66d authored by Neil-Jocelyn Schark's avatar Neil-Jocelyn Schark
Browse files

fix linter

parent 41c0ae87
No related branches found
No related tags found
1 merge request!977Resolve "Improve token usage for users"
Pipeline #218671 passed
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment