feat(web-api): контракт customer auth для Nuxt SSR (me / refresh / Bearer bind) - #588
Open
Ibochkarev wants to merge 2 commits into
Open
feat(web-api): контракт customer auth для Nuxt SSR (me / refresh / Bearer bind)#588Ibochkarev wants to merge 2 commits into
Ibochkarev wants to merge 2 commits into
Conversation
…arer bind) Add GET /customer/me introspection, real POST /customer/token/refresh rotation, and validate Bearer before binding guest cart on login/register.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
Контракт customer auth Web API для headless/Nuxt SSR: introspection
GET /customer/me, реальное продление TTL черезPOST /customer/token/refresh(ротация opaque token, без JWT), bind guest-корзины из валидного Bearer на login/register.Тип изменений
Связанные Issues
Closes #571
Как это было протестировано?
composer test:smoke, PHPUnit lifecycle, PHPStan на затронутых файлах)Конфигурация тестирования:
feat/issue-571-customer-auth-contract←betaNuxt / SSR contract (docs для #571)
Рекомендуемый production path (BFF + Bearer)
Authorization: Bearer <ms3_token>.Same-site cookie path
GET /api/v1/customer/token/get(или auto-mint на cart).credentials: 'include'и точнымms3_cors_allowed_origins.Secure+SameSite=Noneчерез MODXsession_cookie_*(или follow-up settings). Иначе BFF.Запрет
Не хранить API token в
localStorage/sessionStorage.Endpoints
/api/v1/customer/meauthenticated:false)/api/v1/customer/token/refresh/api/v1/customer/login|registerTTL strategy: A (refresh rotate). Sliding TTL не включён. JWT не внедрён. Отдельные
ms3_token_cookie_*settings — out of scope (follow-up).Чеклист
Дополнительные заметки
#334: ложный success-stub не возвращён; тест обновлён под реальный refresh.TokenService(~750 LOC), DI-ключ дляCustomerSessionService, ApachegetallheadersbeyondREDIRECT_HTTP_AUTHORIZATION.