@connectum/auth
Authentication, authorization, trusted gateway and internal identity, auth context, and client credentials.
Install
bash
npm install @connectum/authbash
pnpm add @connectum/authbash
bun add @connectum/authPeer dependencies: @connectum/core, @bufbuild/protobuf ^2.16.0 and @connectrpc/connect ^2.2.0, shared with your application. npm 7+, pnpm and Bun install missing peers automatically; on Yarn, add them yourself — see Peer dependencies on protobuf and Connect.
Start Here
typescript
import { createJwtAuthInterceptor } from '@connectum/auth';
const jwtAuth = createJwtAuthInterceptor({
jwksUri: 'https://id.example.com/.well-known/jwks.json',
issuer: 'https://id.example.com/',
audience: 'orders-api',
});Key Entry Points
| Entry point | Use it to |
|---|---|
createJwtAuthInterceptor | Verify bearer tokens with JWKS, public keys, or a shared secret. |
createAuthzInterceptor | Apply explicit allow and deny rules. |
createProtoAuthzInterceptor | Resolve authorization from proto options; see chain setup. |
createInternalAuthInterceptor | Require a trust source on internal method patterns. |
requireAuthContext | Read the verified identity in a handler. |
Learn / Configure / API Reference
- Learn: Focused guide
- Configure: Task and configuration guidance
- API reference: Exact options and symbols
- Package API index: Generated TypeDoc
- Source: @connectum/auth on GitHub
Related Modules
Compare all Connectum packages by capability.