From b988dc8f3fd0b6ccf88cad5e836937d6150451e8 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Apr 2026 15:43:55 +0000 Subject: [PATCH] Add SecurityContext import and gotcha to SKILL.md The Security section example showed SecurityContext in method signatures but never showed the import statement. Added the import and a new gotcha #9 noting that SecurityContext lives in api.auth, not api. https://claude.ai/code/session_01WtjhAvGHHxCJxGZ7PZWNFP --- skills/teavm-lambda/SKILL.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skills/teavm-lambda/SKILL.md b/skills/teavm-lambda/SKILL.md index 7b13446..11bc484 100644 --- a/skills/teavm-lambda/SKILL.md +++ b/skills/teavm-lambda/SKILL.md @@ -207,6 +207,8 @@ Env vars: `JWT_SECRET` (HMAC) or `JWT_ALGORITHM=firebase` + `FIREBASE_PROJECT_ID Modules: `teavm-lambda-auth` (JS) or `teavm-lambda-auth-jvm` (JVM). ```java +import ca.weblite.teavmlambda.api.auth.SecurityContext; + @RolesAllowed({"user"}) public Response me(SecurityContext ctx) { String userId = ctx.getSubject(); @@ -293,6 +295,8 @@ See `references/kotlin-dsl.md` for the full API reference. 8. **WAR: don't call `Platform.start()`.** Subclass `WarServlet`, override `createRouter()`, annotate with `@WebServlet(urlPatterns = "/*")`. +9. **`SecurityContext` is in `ca.weblite.teavmlambda.api.auth`** — not in `ca.weblite.teavmlambda.api` alongside `Response` and `Request`. Import: `import ca.weblite.teavmlambda.api.auth.SecurityContext;`. + ## Environment Variables | Variable | Purpose | Default |