원클릭으로
auth-authorization
Trace or modify Madoc TS authentication and authorization. Use when working on login strategies, JWT parsing/verification, cookie handling, or route-level authorization in services/madoc-ts.
메뉴
Trace or modify Madoc TS authentication and authorization. Use when working on login strategies, JWT parsing/verification, cookie handling, or route-level authorization in services/madoc-ts.
Understand and modify the full Madoc TS crowdsourcing contribution and review pipeline. Use when changing claim creation rules, crowdsourcing-task and crowdsourcing-review lifecycle behavior, reviewer assignment policy, or project settings that control submission/review flow in services/madoc-ts.
Work on Madoc TS site UI structure, React routes, and site-specific SSR behaviors. Use when adding or updating site pages, loaders, or site theme usage in services/madoc-ts.
Build, run, and debug the Madoc Docker/compose stack with the Docker daemon already running, including rebuilding images, starting/stopping services, inspecting containers/images, and using pm2 inside the madoc-ts container (server/queue/scheduler/auth) plus frontend rebuilds for volume-mounted assets.
Work on Madoc TS project export extension configs, export plan handling, and file output helpers. Use when adding export types or modifying export data flows in services/madoc-ts.
Work on Madoc TS admin UI structure, React routes, and admin-specific SSR behaviors. Use when adding admin screens, updating management flows, or adjusting admin-only UI in services/madoc-ts.
Work on Madoc TS activity stream endpoints and IIIF collection/manifest routing. Use when changing activity stream routes or IIIF data responses in services/madoc-ts.
| name | auth-authorization |
| description | Trace or modify Madoc TS authentication and authorization. Use when working on login strategies, JWT parsing/verification, cookie handling, or route-level authorization in services/madoc-ts. |
Document how Madoc TS authenticates users, parses/verifies JWTs, and applies authorization in middleware and route handlers.
services/madoc-ts/src/auth-server.tsservices/madoc-ts/src/auth/index.ts, services/madoc-ts/src/auth/github.tsservices/madoc-ts/src/auth/utils/login-with-provider.tsservices/madoc-ts/src/middleware/parse-jwt.tsservices/madoc-ts/src/middleware/set-jwt.tsservices/madoc-ts/src/utility/verify-signed-token.tssrc/auth/index.ts and exposed via getAuthRoutes().koa-passport and passport-github2 in src/auth/github.ts.GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, and GITHUB_CLIENT_CALLBACK_URL are set.loginWithProvider, which:
user table (federated_logins JSON column).context.siteManager.getVerifiedLogin and sets context.state.authenticatedUser./ after successful login.verifySignedToken (RS256, public key from getPublicPem).parseJwt middleware:
/s/:slug/...).context.siteManager.refreshExpiredToken and sets new cookies.getToken() and verifies it (normally gateway-verified but rechecked here).context.state.jwt and context.state.user when a token is valid.NotAuthorized if a non-site request lacks a valid token.setJwt middleware sets auth cookies for authenticated users when no JWT is present yet.auth/index.ts to see registered strategies and routes.auth/github.ts) and include it in strategies.login-with-provider.ts to see how federated login is linked to a user and how session cookies are set.parse-jwt.ts for cookie parsing, token refresh, and fallback token verification.verify-signed-token.ts.parse-jwt control flow)context.state.jwt set