- Introduced the FileAccessDownloadToken entity with properties for managing file access tokens. - Created a migration to add the file_access_download_tokens table to the database with appropriate constraints and indexes.
2.0 KiB
2.0 KiB
Member Center Test Site
src/MemberCenter.TestSite 是手動 happy-path 測試用網站,用來先驗證外部網站整合會員中心的最小流程。
啟動
dotnet run --project src/MemberCenter.TestSite
預設 HTTP URL:
http://localhost:5243
必要設定
在 src/MemberCenter.TestSite/appsettings.Development.json 或環境變數設定:
{
"MemberCenter": {
"ApiBaseUrl": "http://localhost:7850",
"WebBaseUrl": "http://localhost:5080",
"WebLoginClientId": "<web_login client id>",
"ServiceClientId": "<service client id>",
"ServiceClientSecret": "<service client secret>"
}
}
web_login OAuth client:
usage=web_loginclient_type=public- redirect URI:
http://localhost:5243/auth/callback - scopes:
openid email profile profile:basic.read profile:basic.write profile:addresses.read profile:addresses.write profile:subscriptions.read profile:subscriptions.write
service OAuth client:
- 建議使用
tenant_api或platform_service client_type=confidential- scopes 至少包含
profile:basic.read profile:addresses.read
若 Member Center API 與 Web login 不同 origin,Member Center 需設定:
Auth__WebLoginUrl=<Member Center Web login URL>
Auth__AllowedLoginReturnUrlPrefixes=<Member Center API issuer/base URL>
Auth__AllowedLogoutReturnUrlPrefixes=http://localhost:5243/
Auth__CookieDomain=<shared cookie domain, production subdomain SSO only>
第一批 Happy Path
測試站目前包含:
- Redirect login 拿 token
- Redirect logout 清除 Member Center Web session 並回到 TestSite
- API login 拿 token
GET /user/profilePOST /user/profileGET /user/addressesPOST /user/addressesGET /user/subscriptionsPOST /user/subscriptions/{id}/unsubscribe- service token 呼叫
GET /user/profile/by-email - service token 呼叫
GET /user/addresses/by-email
測試站只做 happy path,不取代完整自動化測試。