golem-add-http-auth-ts

Adds authentication to TypeScript HTTP endpoints via decorator flags and golem.yaml security schemes.

Updated May 17, 2026
One-click install
npx skills add https://github.com/Rust-soham/golem-claw --skill golem-add-http-auth-ts-rust-soham
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: golem-add-http-auth-ts
Source: https://github.com/Rust-soham/golem-claw/tree/main/packages/golem/.agents/skills/golem-add-http-auth-ts
Command: npx skills add https://github.com/Rust-soham/golem-claw --skill golem-add-http-auth-ts-rust-soham

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you require authentication for TypeScript HTTP endpoints so only verified users can access protected API routes.

Core Features & Use Cases

  • Mount-level protection: Set auth: true on the @agent() decorator to require authentication for every endpoint under a mount path.
  • Endpoint-level control: Set auth: true or auth: false on @endpoint() to protect individual routes or exempt specific ones.
  • Authenticated user context: Inject a Principal into authenticated endpoint handlers to access the authenticated user identity.
  • Deployment security scheme hookup: After enabling auth: true in code, configure the corresponding HTTP API security scheme in golem.yaml for the target domain.

Quick Start

Update your TypeScript agent and endpoint decorators to set auth: true, then configure the matching OIDC (or test) security scheme in golem.yaml for your deployed domain.

Frequently Asked Questions about golem-add-http-auth-ts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add OIDC authentication to TypeScript HTTP endpoints?▼

To add OIDC authentication to TypeScript HTTP endpoints, set `auth: true` on the `@agent()` or `@endpoint()` decorators, then configure the corresponding security scheme in your `golem.yaml` file for deployment.

Can I exempt specific routes from mount-level authentication?▼

Yes, you can exempt specific routes from mount-level authentication by setting `auth: false` on individual `@endpoint()` decorators, selectively allowing unauthenticated access while keeping other routes under the mount path protected.

How do I access the authenticated user identity inside an endpoint handler?▼

You access the authenticated user identity by injecting a `Principal` parameter directly into your authenticated TypeScript endpoint handler, passing the verified identity context for use within your API logic.

What is the difference between agent-level and endpoint-level auth flags?▼

Agent-level auth flags require authentication for every endpoint under a mount path, while endpoint-level auth flags allow granular control to protect individual routes or selectively exempt specific ones from the broader agent requirement.

Do I need to configure a security scheme in golem.yaml for HTTP API authentication?▼

Yes, you must configure the corresponding HTTP API security scheme, such as OIDC or a test header, in `golem.yaml` after enabling auth flags in code to enforce authenticated access on your deployed domain.

Why is my TypeScript endpoint still accessible without authentication after setting auth to true?▼

Your TypeScript endpoint remains accessible without authentication if the matching security scheme is not configured in `golem.yaml` for the target domain, or if the specific endpoint decorator overrides the mount-level setting with `auth: false`.