feat(keycloak): organizations become the membership authority source (#19)
This commit was merged in pull request #19.
This commit is contained in:
@@ -75,11 +75,12 @@ type Adapter interface {
|
||||
SyncClaims(ctx context.Context, userID string, c Claims) error
|
||||
|
||||
// Memberships resolves the tenants user userID (the Keycloak user id,
|
||||
// i.e. the JWT `sub`) belongs to, as Keycloak records them. The realm
|
||||
// has no Organizations yet, so this reads the user's attribute
|
||||
// projection — zero or one memberships. When the realm migrates to
|
||||
// Organizations this becomes an org-membership query and callers keep
|
||||
// working unchanged. Returns ErrUserNotFound for an unknown user id.
|
||||
// i.e. the JWT `sub`) belongs to, as Keycloak records them. Since the
|
||||
// realm enabled Organizations (2026-09-01) this is an org-membership
|
||||
// query: one membership per enabled org the user belongs to (alias =
|
||||
// tenant slug, org attribute tenant_id = registry UUID). The legacy
|
||||
// user-attribute projection no longer grants membership on its own.
|
||||
// Returns ErrUserNotFound for an unknown user id.
|
||||
Memberships(ctx context.Context, userID string) ([]Claims, error)
|
||||
|
||||
// Health pings the admin endpoint. Used by readyz and the cluster cold-
|
||||
|
||||
Reference in New Issue
Block a user