Skip to content

Commit

Permalink
Merge pull request #22 from appuio/fix/session-leak
Browse files Browse the repository at this point in the history
Fix Keycloak session leak
  • Loading branch information
glrf committed Apr 27, 2022
2 parents 402033c + 116ee37 commit 71d1bf3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/pkg/keycloak/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ func (g *gocloakClient) GetUsers(ctx context.Context, realm string, params goclo
if err != nil {
return nil, fmt.Errorf("failed binding to keycloak: %w", err)
}
// `admin-cli` is the magic client used when authenticating to the admin API
defer g.client.LogoutPublicClient(ctx, "admin-cli", g.loginRealm, token.AccessToken, token.RefreshToken)

return g.client.GetUsers(ctx, token.AccessToken, realm, params)
}

0 comments on commit 71d1bf3

Please sign in to comment.