axiam-sdk 1.0.0-alpha10 → 1.0.0-alpha12
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 +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,6 +58,9 @@ import { AxiamClient } from 'axiam-sdk';
|
|
|
58
58
|
const client = new AxiamClient({
|
|
59
59
|
baseUrl: 'https://iam.example.com',
|
|
60
60
|
tenantSlug: 'acme',
|
|
61
|
+
// Organization context is required for login/refresh — a tenant slug is only
|
|
62
|
+
// unique within an organization (CONTRACT.md §5.1). Pass orgSlug (or orgId).
|
|
63
|
+
orgSlug: 'acme',
|
|
61
64
|
// customCa is optional — PEM-encoded CA cert for self-signed dev environments (§6)
|
|
62
65
|
// customCa: pemString,
|
|
63
66
|
});
|
|
@@ -77,6 +80,7 @@ import { AxiamClient } from 'axiam-sdk';
|
|
|
77
80
|
const client = new AxiamClient({
|
|
78
81
|
baseUrl: 'https://iam.example.com',
|
|
79
82
|
tenantSlug: 'acme',
|
|
83
|
+
orgSlug: 'acme', // organization context required for login/refresh (CONTRACT.md §5.1)
|
|
80
84
|
clientCert: readFileSync('device.crt', 'utf8'), // PEM certificate chain
|
|
81
85
|
clientKey: readFileSync('device.key', 'utf8'), // PEM private key (PKCS#8 or PKCS#1)
|
|
82
86
|
// customCa: readFileSync('ca.crt', 'utf8'), // optional server-trust CA (§6)
|
|
@@ -98,7 +102,7 @@ const client = new AxiamClient({
|
|
|
98
102
|
```typescript
|
|
99
103
|
import { AxiamClient } from 'axiam-sdk';
|
|
100
104
|
|
|
101
|
-
const client = new AxiamClient({ baseUrl: 'https://iam.example.com', tenantSlug: 'acme' });
|
|
105
|
+
const client = new AxiamClient({ baseUrl: 'https://iam.example.com', tenantSlug: 'acme', orgSlug: 'acme' });
|
|
102
106
|
|
|
103
107
|
const result = await client.login(email, password);
|
|
104
108
|
switch (result.status) {
|