Skip to content

Commit 71d1bf3

Browse files
authored
Merge pull request #22 from appuio/fix/session-leak
Fix Keycloak session leak
2 parents 402033c + 116ee37 commit 71d1bf3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/pkg/keycloak/client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ func (g *gocloakClient) GetUsers(ctx context.Context, realm string, params goclo
3737
if err != nil {
3838
return nil, fmt.Errorf("failed binding to keycloak: %w", err)
3939
}
40+
// `admin-cli` is the magic client used when authenticating to the admin API
41+
defer g.client.LogoutPublicClient(ctx, "admin-cli", g.loginRealm, token.AccessToken, token.RefreshToken)
4042

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

0 commit comments

Comments
 (0)