Skip to content
PackagesSecurityDocs 1.3.x

@connectum/auth ​

Authentication, authorization, trusted gateway and internal identity, auth context, and client credentials.

Install ​

bash
npm install @connectum/auth
bash
pnpm add @connectum/auth
bash
bun add @connectum/auth

Peer 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 pointUse it to
createJwtAuthInterceptorVerify bearer tokens with JWKS, public keys, or a shared secret.
createAuthzInterceptorApply explicit allow and deny rules.
createProtoAuthzInterceptorResolve authorization from proto options; see chain setup.
createInternalAuthInterceptorRequire a trust source on internal method patterns.
requireAuthContextRead the verified identity in a handler.

Learn / Configure / API Reference ​

Compare all Connectum packages by capability.