3a51305343
- six REST endpoints (auth/request_otp, verify_otp, refresh, logout, me, me/select_role) wrapping the existing JWE/TOTP/RBAC engine - usr.UserSessions with refresh-token rotation + stolen-token (replay) detection → revoke-all + 401; logout rotates the security stamp - users extended: gender, national_id (enc, NULL until KYC), shahkar_verified_at (auto-reset on phone change), phone_hash UNIQUE, is_active, deleted_at + soft-delete filter; phone/email/national_id encrypted at rest via IFieldEncryptor value converter - user_roles grant/revoke audit trail + global revoked filter; 7 roles seeded; admin sub-roles never self-assignable (403) - ISmsSender seam (mock logs the OTP code) replaces the TODO log lines - OperationResult/BaseController learned enveloped 401/403 - auth knobs as platform_configs rows (resend/attempts/session TTL) - migration IdentitySessionsAndUserExtensions applied to the dev DB - 24 new tests incl. Baya.Test.Api (WebApplicationFactory over SQLite); 47 total green, zero new build warnings; swagger snapshot + contract (identity-auth.md), handoff, report, mocks-registry updated Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
96 lines
8.2 KiB
JSON
96 lines
8.2 KiB
JSON
{
|
|
"permissions": {
|
|
"allow": [
|
|
"Bash(rm -rf server/.template.config)",
|
|
"Bash(rm -f server/CleanArcTemplate.nuspec)",
|
|
"Bash(rm -f server/.github/workflows/package.yml)",
|
|
"Bash(rmdir server/.github/workflows)",
|
|
"Bash(rmdir server/.github)",
|
|
"Bash(npm -v)",
|
|
"Bash(dotnet --version)",
|
|
"Bash(npm install *)",
|
|
"Bash(node -e \"const p=require\\('./node_modules/next/package.json'\\).version; const m=require\\('./node_modules/@mui/material/package.json'\\).version; const r=require\\('./node_modules/react/package.json'\\).version; const e=require\\('./node_modules/eslint/package.json'\\).version; const mn=require\\('./node_modules/@mui/material-nextjs/package.json'\\).version; console.log\\('next',p\\);console.log\\('@mui/material',m\\);console.log\\('@mui/material-nextjs',mn\\);console.log\\('react',r\\);console.log\\('eslint',e\\);\")",
|
|
"Bash(node -e ' *)",
|
|
"Bash(npx tsc *)",
|
|
"Bash(echo \"TYPE_EXIT=$?\")",
|
|
"Bash(npm run *)",
|
|
"PowerShell(ls \"c:\\\\Users\\\\Lenovo\\\\Desktop\\\\balinyaar\\\\client\\\\node_modules\\\\@mui\\\\material\" | Select-Object Name | Where-Object { $_.Name -match \"Color|Init|Css\" })",
|
|
"PowerShell(node -e \"const v = require\\('c:/Users/Lenovo/Desktop/balinyaar/client/node_modules/@testing-library/jest-dom/package.json'\\).version; console.log\\('@testing-library/jest-dom', v\\)\")",
|
|
"WebFetch(domain:www.nuget.org)",
|
|
"Bash(xargs grep -l \"Route\\\\|ApiVersion\\\\|Controller\")",
|
|
"PowerShell(cd \"c:\\\\Users\\\\Lenovo\\\\Desktop\\\\balinyaar\\\\server\"; dotnet build 2>&1 | Select-String -Pattern \"error|warning|Build succeeded|Build FAILED\" | Where-Object { $_ -notmatch \"NETSDK1057\" })",
|
|
"Read(//c/Users/Lenovo/Desktop/balinyaar/server/src/API/Baya.Web.Api/Controllers/V1/**)",
|
|
"Bash(cd /c/Users/Lenovo/Desktop/balinyaar/client && find . -type f -name \"*.ts\" -o -name \"*.tsx\" -o -name \"*.json\" -o -name \"*.mjs\" | head -50)",
|
|
"Read(//c/c/Users/Lenovo/Desktop/balinyaar/**)",
|
|
"Bash(xargs grep -l \"getLocale\\\\|setRequestLocale\\\\|requestLocale\")",
|
|
"Bash(node -e \"const p=require\\('c:/Users/Lenovo/Desktop/balinyaar/client/package.json'\\); console.log\\(JSON.stringify\\({scripts:p.scripts,next:p.dependencies?.next},null,2\\)\\)\")",
|
|
"Bash(node -e \"const p=require\\('c:/Users/Lenovo/Desktop/balinyaar/client/node_modules/next/package.json'\\); console.log\\(p.version\\)\")",
|
|
"Bash(node -e \"const d=JSON.parse\\(require\\('fs'\\).readFileSync\\('/dev/stdin','utf8'\\)\\); const keys=Object.keys\\(d.exports||{}\\).filter\\(k=>k.includes\\('middleware'\\)||k.includes\\('server'\\)\\); console.log\\(keys.slice\\(0,20\\)\\)\")",
|
|
"Bash(xargs grep -l \"middleware\")",
|
|
"Bash(node -e \"const p=require\\('c:/Users/Lenovo/Desktop/balinyaar/client/node_modules/next-intl/package.json'\\); const exp=p.exports; const keys=Object.keys\\(exp||{}\\).filter\\(k=>k.includes\\('middleware'\\)\\); keys.forEach\\(k=>console.log\\(k,JSON.stringify\\(exp[k]\\)\\)\\)\")",
|
|
"PowerShell(Select-String -Path \"c:\\\\Users\\\\Lenovo\\\\Desktop\\\\balinyaar\\\\client\\\\node_modules\\\\next\\\\dist\\\\lib\\\\constants.js\" -Pattern \"MIDDLEWARE_FILENAME|MIDDLEWARE_LOCATION\" | ForEach-Object { $_.Line.Substring\\(0, [Math]::Min\\(300, $_.Line.Length\\)\\) })",
|
|
"Bash(node -e \"const p = require\\('c:/Users/Lenovo/Desktop/balinyaar/client/node_modules/next-intl/package.json'\\); console.log\\(JSON.stringify\\(p.exports['./plugin'] || p.exports, null, 2\\).substring\\(0, 1000\\)\\);\")",
|
|
"Bash(xargs grep -l \"HEADER_LOCALE_NAME\\\\|X-NEXT-INTL\")",
|
|
"Bash(xargs ls)",
|
|
"Bash(xargs grep \"AppStoreProvider\")",
|
|
"Bash(node -e \"const p = require\\('./node_modules/notistack/package.json'\\); console.log\\('version:', p.version\\); console.log\\('peerDeps:', JSON.stringify\\(p.peerDependencies, null, 2\\)\\)\")",
|
|
"Bash(node -e \"const n = require\\('c:/Users/Lenovo/Desktop/balinyaar/client/node_modules/notistack'\\); console.log\\(Object.keys\\(n\\)\\)\")",
|
|
"Bash(Get-ChildItem -Path \"c:\\\\Users\\\\Lenovo\\\\Desktop\\\\balinyaar\\\\client\" -Force)",
|
|
"Bash(Select-Object Name, PSIsContainer)",
|
|
"Bash(npm audit *)",
|
|
"Bash(*)",
|
|
"Read(*)",
|
|
"Edit(*)",
|
|
"Write(*)",
|
|
"Glob(*)",
|
|
"Grep(*)",
|
|
"WebFetch(*)",
|
|
"WebSearch(*)",
|
|
"Agent(*)",
|
|
"NotebookEdit(*)",
|
|
"Skill(*)",
|
|
"mcp__claude_ai_Mermaid_Chart__validate_and_render_mermaid_diagram",
|
|
"Edit(/.claude/skills/frontend-designer/**)",
|
|
"Bash(rm -f src/Infrastructure/Baya.Infrastructure.Persistence/Migrations/*.cs && echo \"migrations dir now:\" && ls -la src/Infrastructure/Baya.Infrastructure.Persistence/Migrations/ 2>/dev/null || echo \"\\(empty/gone\\)\")",
|
|
"Bash(dotnet build *)",
|
|
"Bash(export ASPNETCORE_ENVIRONMENT=Production)",
|
|
"Bash(export ASPNETCORE_URLS=\"http://127.0.0.1:5080\")",
|
|
"Bash(export Kestrel__EndpointDefaults__Protocols=\"Http1\")",
|
|
"Bash(nohup dotnet run --project src/API/Baya.Web.Api/Baya.Web.Api.csproj --no-build --no-launch-profile)",
|
|
"Bash(echo \"started pid $!\")",
|
|
"Bash(Get-ChildItem -Path \"c:\\\\Users\\\\Lenovo\\\\Desktop\\\\balinyaar\\\\server\" -Recurse -Directory)",
|
|
"Bash(Select-Object FullName)",
|
|
"Bash(dotnet ef *)",
|
|
"Bash(dotnet test *)",
|
|
"Bash(ASPNETCORE_ENVIRONMENT=Development ASPNETCORE_URLS=\"http://localhost:5080\" dotnet run --project src/API/Baya.Web.Api/Baya.Web.Api.csproj --no-build)",
|
|
"Bash(curl -sk https://localhost:5002/swagger/v1/swagger.json -o \"c:/Users/Lenovo/Desktop/balinyaar/dev/contracts/openapi/swagger.v1.json\")",
|
|
"Bash(curl -sk https://localhost:5002/api/v1/ping/get_status)",
|
|
"Bash(taskkill //F //IM Baya.Web.Api.exe)",
|
|
"Bash(taskkill //F //IM dotnet.exe //FI \"MEMUSAGE gt 90000\")",
|
|
"Bash(tasklist)",
|
|
"Bash(ASPNETCORE_ENVIRONMENT=Development dotnet run --project src/API/Baya.Web.Api/Baya.Web.Api.csproj --no-build)",
|
|
"Bash(git add *)",
|
|
"Bash(git commit *)",
|
|
"Bash(xargs echo \"remaining unstaged/untracked entries:\")",
|
|
"Bash(git commit -m ' *)",
|
|
"Bash(dotnet sln *)",
|
|
"Bash(curl -s -o /dev/null -w \"%{http_code}\" http://localhost:5188/swagger/v1/swagger.json)",
|
|
"Read(//c/Users/Lenovo/AppData/Local/Temp/claude/c--Users-Lenovo-Desktop-balinyaar/9f660ead-4935-40d5-9ba2-c846d642a0db/scratchpad/**)",
|
|
"Bash(curl -s -o /dev/null -w \"%{http_code}\\\\n\" http://localhost:5188/api/v1/me)",
|
|
"Bash(curl -s http://localhost:5188/api/v1/me -H 'Authorization: Bearer __TRACKED_VAR__')",
|
|
"Bash(curl -s -X POST http://localhost:5188/api/v1/auth/refresh -H 'Content-Type: application/json' -d '{\"refreshToken\":\"__TRACKED_VAR__\"}')",
|
|
"Bash(node -e \"const d=JSON.parse\\(require\\('fs'\\).readFileSync\\('step5.json'\\)\\); console.log\\('status ok:',d.isSuccess,'| roles:',JSON.stringify\\(d.data.roles\\)\\); require\\('fs'\\).writeFileSync\\('at2.txt',d.data.accessToken\\)\")",
|
|
"Bash(curl -s -o /dev/null -w '%{http_code}\\\\n' -X POST http://localhost:5188/api/v1/auth/refresh -H 'Content-Type: application/json' -d '{\"refreshToken\":\"__TRACKED_VAR__\"}')",
|
|
"Bash(curl -s -o /dev/null -w \"%{http_code}\\\\n\" -X POST http://localhost:5188/api/v1/auth/verify_otp -H \"Content-Type: application/json\" -d '{\"phone\":\"09121112233\",\"code\":\"000000\"}')",
|
|
"Bash(curl -s -o /dev/null -w '%{http_code}\\\\n' -X POST http://localhost:5188/api/v1/auth/logout -H 'Authorization: Bearer __TRACKED_VAR__' -H 'Content-Type: application/json' -d '{}')",
|
|
"Bash(curl -s -o /dev/null -w '%{http_code}\\\\n' http://localhost:5188/api/v1/me -H 'Authorization: Bearer __TRACKED_VAR__')",
|
|
"Bash(curl -s -o /dev/null -w \"%{http_code} \" -X POST http://localhost:5188/api/v1/auth/request_otp -H \"Content-Type: application/json\" -d '{\"phone\":\"09121112244\"}')",
|
|
"Bash(curl -s http://localhost:5188/swagger/v1/swagger.json -o /c/Users/Lenovo/Desktop/balinyaar/dev/contracts/openapi/swagger.v1.json)"
|
|
],
|
|
"defaultMode": "bypassPermissions",
|
|
"additionalDirectories": [
|
|
"C:\\Users\\Lenovo\\Desktop\\balinyaar\\server\\src\\Infrastructure\\Baya.Infrastructure.Persistence\\Migrations"
|
|
]
|
|
}
|
|
}
|