Add legacy-auth-bridge logout endpoint - #505
Conversation
GET legacy-auth/logout proxies gama-api's own GET /users/logout, relaying the caller's raw legacy JWT from the Authorization header. Pure passthrough like register/recovery - this backend never stored the token, so gama-api is the one actually invalidating the session, closing the gap where tokens/revoke couldn't touch a legacy-bridge session. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
endpoint address must changed and its logic need review |
|
@farsica thanks for flagging this — wanted to explain the reasoning before we change anything, and get more specifics from you. Why it's built this way today: Question: what specifically do you think needs review — should |
Summary
GET api/v1/legacy-auth/logout, closing a gap left by the original legacy-auth-bridge work: there was no way to end a gama-api-issued session early (tokens/revokeonly covers this backend's own opaque-token store).register/recovery: relays the caller's raw legacy JWT (read from theAuthorizationheader) to gama-api's ownGET /users/logout(bearer-auth, confirmed against gama-api'sopenapi.yaml). This backend never stored the token, so gama-api is the one actually invalidating the session server-side.Core:Logoutconfig entry (appsettings.json/appsettings.Development.json),ICoreProvider.LegacyLogoutAsync/CoreProviderimplementation,IIdentityService.LegacyLogoutAsync/IdentityServiceimplementation, and the controller action.docs/api/authentication.md,docs/api/endpoints.md,docs/business/identity-and-access.md,PROJECT_SNAPSHOT.md— the "can't revoke a legacy-bridge session early" trade-off called out in the original bridge work is now qualified:tokens/revokestill can't, but this new endpoint can.Test plan
dotnet build— clean, 0 warnings/errors.legacy-auth/login, then calllegacy-auth/logoutwith the returned token asAuthorization: Bearer {token}and confirm gama-api's session actually ends (e.g. a subsequent authenticated gama-api call with the same token is rejected).legacy-auth/logoutwith noAuthorizationheader and confirm a clean "missing token" error, not an exception.🤖 Generated with Claude Code