@caracalai/oauth
v1.0.0
Published
Caracal RFC 8693 OAuth 2.0 token exchange client.
Maintainers
Readme
Caracal OAuth for TypeScript
TypeScript RFC 8693 token exchange client for Caracal STS.
import { OAuthClient } from '@caracalai/oauth'
const client = new OAuthClient('https://sts.example.com', 'zone1', 'app1')
const token = await client.exchange(subjectToken, 'resource://api', {
clientSecret: 'client-secret',
scopes: ['read'],
})Successful responses are validated before caching. Cache keys isolate subject tokens, actor tokens, session/delegation context, scopes, TTL, and client authentication context. The default cache is in-memory and process-local.
Docs: https://caracal.run/sdks/oauth/
