@drmhse/sso-sdk 0.5.3 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -0
- package/dist/index.d.mts +4641 -4542
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +4641 -4542
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4598 -5082
- package/dist/index.mjs +4583 -5039
- package/dist/index.mjs.map +1 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -91,6 +91,26 @@ const result = await sso.serviceApi.requestProviderToken({
|
|
|
91
91
|
});
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
+
### Enterprise-managed authorization
|
|
95
|
+
|
|
96
|
+
For MCP and Cross-App Access style flows, exchange a service-scoped AuthOS JWT
|
|
97
|
+
for an ID-JAG, then redeem it for a resource-scoped bearer token:
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
const idJag = await sso.auth.enterprise.requestIdJag({
|
|
101
|
+
client_id: 'service-client-id',
|
|
102
|
+
audience: 'https://auth.example.com',
|
|
103
|
+
resource: 'https://api.example.com/mcp',
|
|
104
|
+
subject_token: serviceAccessToken,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
const resourceToken = await sso.auth.enterprise.exchangeIdJag({
|
|
108
|
+
client_id: 'service-client-id',
|
|
109
|
+
client_secret: process.env.AUTHOS_SERVICE_CLIENT_SECRET!,
|
|
110
|
+
assertion: idJag.access_token,
|
|
111
|
+
});
|
|
112
|
+
```
|
|
113
|
+
|
|
94
114
|
## Feature highlights
|
|
95
115
|
|
|
96
116
|
- Password, OAuth, magic-link, passkey, MFA, and device-flow authentication
|
|
@@ -98,6 +118,7 @@ const result = await sso.serviceApi.requestProviderToken({
|
|
|
98
118
|
- Linked accounts and provider-token request completion flows
|
|
99
119
|
- Organization, service, analytics, audit-log, and platform-owner APIs
|
|
100
120
|
- Service API helpers including backend-only provider token retrieval
|
|
121
|
+
- Enterprise-managed authorization helpers for ID-JAG resource access
|
|
101
122
|
|
|
102
123
|
## Canonical references
|
|
103
124
|
|