@axcode/axcloud-sdk 0.3.2-dev.359fd8b → 0.3.2-dev.9bbafe5

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 CHANGED
@@ -137,6 +137,37 @@ function App() {
137
137
  `auth0.organization` is the Auth0 Organization ID used during login, for example `org_o960yILn77d4vY6u`.
138
138
  Set `auth0.organization` for invite-only customer member sites so Universal Login is scoped to that customer organization.
139
139
 
140
+ ### Customer-owned identity providers
141
+
142
+ An organization may authenticate through its own Auth0 tenant while AxCloud
143
+ continues to provide content, membership and authorization APIs. Configure the
144
+ complete, reviewed provider tuple statically in the first-party site:
145
+
146
+ ```tsx
147
+ <AxCloudProvider
148
+ orgId="org_customer"
149
+ apiUrl="https://dev-api.axcloud.app"
150
+ stage="dev"
151
+ auth0={{
152
+ identityProviderId: 'idp_customer_dev',
153
+ domain: 'dev-auth.customer.example',
154
+ clientId: 'customer-member-spa-client-id',
155
+ audience: 'https://api.axcloud.app',
156
+ organization: 'org_customer_auth0',
157
+ redirectUri: window.location.origin,
158
+ }}
159
+ >
160
+ <App />
161
+ </AxCloudProvider>
162
+ ```
163
+
164
+ `identityProviderId` is a public AxCloud identifier, not a credential. It is
165
+ included in the SDK cache-owner signature so a provider switch or rotation
166
+ cannot reuse identity-bound query data. The SDK does not discover providers or
167
+ hold Auth0 Management API credentials. Keep domain, client ID, audience,
168
+ organization ID, AxCloud stage and API URL together as one environment-specific
169
+ configuration; never mix a customer DEV tenant with AxCloud PROD APIs.
170
+
140
171
  ### 2. Fetch content
141
172
 
142
173
  ```tsx
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { A as AxCloudClient, c as createClient, g as getClient } from './client-FOpKwe3e.mjs';
2
- import { A as AxCloudAnalyticsOptions, U as User$1, a as UserRole, O as Organization, b as AxCloudModule, C as ContentQueryOptions, N as NewsItem, c as ContentListResponse, S as Section, d as SignedMediaUrl, e as OrganizationBranding, M as MediaItem, f as MediaListResponse, g as SignedDocumentUrl, D as DocumentQueryOptions, h as DocumentItem, i as DocumentListResponse, j as DocumentFolder, k as DocumentFolderListResponse } from './useContent-1WbKvPY4.mjs';
3
- export { l as AnalyticsEventData, m as AnalyticsEventValue, n as AnalyticsPublicConfig, o as AnalyticsRuntime, p as AnalyticsRuntimeConfig, q as AxCloudConfig, B as BaseRole, r as ContentCollectionType, s as ContentDetailType, t as ContentItem, u as ContentSlotImage, v as ContentSlotMap, w as ContentSlotReader, x as ContentSlotValue, y as CustomRole, z as DocumentAudience, E as DocumentSourceProvider, F as DocumentStatus, G as Membership, H as OrganizationSettings, P as Page, I as PageContentState, J as PaginatedResponse, K as SectionPermissions, L as SystemRole, Q as createContentSlotReader, R as fetchAnalyticsPublicConfig, T as getContentSlotMap, V as isAllowedAnalyticsEvent, W as isLocalAnalyticsHostname, X as sanitizeAnalyticsEventData, Y as sanitizeAnalyticsPath, Z as useAnalytics, _ as useAnalyticsRuntime, $ as useAxCloudContext, a0 as useContent, a1 as useContentItem, a2 as usePageContent, a3 as userHasAllPermissions, a4 as userHasAnyPermission, a5 as userHasPermission } from './useContent-1WbKvPY4.mjs';
2
+ import { A as AxCloudAnalyticsOptions, U as User$1, a as UserRole, O as Organization, b as AxCloudModule, C as ContentQueryOptions, N as NewsItem, c as ContentListResponse, S as Section, d as SignedMediaUrl, e as OrganizationBranding, M as MediaItem, f as MediaListResponse, g as SignedDocumentUrl, D as DocumentQueryOptions, h as DocumentItem, i as DocumentListResponse, j as DocumentFolder, k as DocumentFolderListResponse } from './useContent-aln3Xpis.mjs';
3
+ export { l as AnalyticsEventData, m as AnalyticsEventValue, n as AnalyticsPublicConfig, o as AnalyticsRuntime, p as AnalyticsRuntimeConfig, q as AxCloudConfig, B as BaseRole, r as ContentCollectionType, s as ContentDetailType, t as ContentItem, u as ContentSlotImage, v as ContentSlotMap, w as ContentSlotReader, x as ContentSlotValue, y as CustomRole, z as DocumentAudience, E as DocumentSourceProvider, F as DocumentStatus, G as Membership, H as OrganizationSettings, P as Page, I as PageContentState, J as PaginatedResponse, K as SectionPermissions, L as SystemRole, Q as createContentSlotReader, R as fetchAnalyticsPublicConfig, T as getContentSlotMap, V as isAllowedAnalyticsEvent, W as isLocalAnalyticsHostname, X as sanitizeAnalyticsEventData, Y as sanitizeAnalyticsPath, Z as useAnalytics, _ as useAnalyticsRuntime, $ as useAxCloudContext, a0 as useContent, a1 as useContentItem, a2 as usePageContent, a3 as userHasAllPermissions, a4 as userHasAnyPermission, a5 as userHasPermission } from './useContent-aln3Xpis.mjs';
4
4
  export { B as BarnsportActivitiesFilter, a as BarnsportActivity, b as BarnsportActivityListItem, c as BarnsportActivityLocation, d as BarnsportActivityResponse, e as BarnsportActivitySchedule, f as BarnsportInquirySubmissionRequest, g as BarnsportInterestSubmissionRequest, h as BarnsportInterestSubmissionResponse, i as BarnsportListResponse, j as BarnsportMunicipality, k as BarnsportRegistrationMethod, l as BarnsportSitemapResponse, m as BarnsportSitemapUrl, n as BarnsportSport, u as useBarnsportActivities, o as useBarnsportActivity, p as useBarnsportMunicipalities, q as useBarnsportSitemap, r as useBarnsportSport, s as useBarnsportSports, t as useSubmitBarnsportInterest } from './useBarnsport-DHyNF9GM.mjs';
5
5
  import React from 'react';
6
6
  import * as _tanstack_react_query from '@tanstack/react-query';
@@ -323,6 +323,11 @@ interface AxCloudProviderProps {
323
323
  /** Optional privacy-safe analytics collection through AxCloud. */
324
324
  analytics?: AxCloudAnalyticsOptions;
325
325
  auth0: {
326
+ /**
327
+ * Stable public AxCloud identity-provider identifier.
328
+ * Used only to isolate SDK-owned state across provider changes.
329
+ */
330
+ identityProviderId?: string;
326
331
  domain: string;
327
332
  clientId: string;
328
333
  redirectUri: string;
@@ -348,6 +353,7 @@ interface AxCloudProviderProps {
348
353
  * apiUrl="https://api.axcloud.app"
349
354
  * apiKey="your-api-key" // Required for public content access
350
355
  * auth0={{
356
+ * identityProviderId: "idp_customer_abc123",
351
357
  * domain: "auth.axcloud.app",
352
358
  * clientId: "xxx",
353
359
  * redirectUri: window.location.origin,
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { A as AxCloudClient, c as createClient, g as getClient } from './client-FOpKwe3e.js';
2
- import { A as AxCloudAnalyticsOptions, U as User$1, a as UserRole, O as Organization, b as AxCloudModule, C as ContentQueryOptions, N as NewsItem, c as ContentListResponse, S as Section, d as SignedMediaUrl, e as OrganizationBranding, M as MediaItem, f as MediaListResponse, g as SignedDocumentUrl, D as DocumentQueryOptions, h as DocumentItem, i as DocumentListResponse, j as DocumentFolder, k as DocumentFolderListResponse } from './useContent-Cl7dvERE.js';
3
- export { l as AnalyticsEventData, m as AnalyticsEventValue, n as AnalyticsPublicConfig, o as AnalyticsRuntime, p as AnalyticsRuntimeConfig, q as AxCloudConfig, B as BaseRole, r as ContentCollectionType, s as ContentDetailType, t as ContentItem, u as ContentSlotImage, v as ContentSlotMap, w as ContentSlotReader, x as ContentSlotValue, y as CustomRole, z as DocumentAudience, E as DocumentSourceProvider, F as DocumentStatus, G as Membership, H as OrganizationSettings, P as Page, I as PageContentState, J as PaginatedResponse, K as SectionPermissions, L as SystemRole, Q as createContentSlotReader, R as fetchAnalyticsPublicConfig, T as getContentSlotMap, V as isAllowedAnalyticsEvent, W as isLocalAnalyticsHostname, X as sanitizeAnalyticsEventData, Y as sanitizeAnalyticsPath, Z as useAnalytics, _ as useAnalyticsRuntime, $ as useAxCloudContext, a0 as useContent, a1 as useContentItem, a2 as usePageContent, a3 as userHasAllPermissions, a4 as userHasAnyPermission, a5 as userHasPermission } from './useContent-Cl7dvERE.js';
2
+ import { A as AxCloudAnalyticsOptions, U as User$1, a as UserRole, O as Organization, b as AxCloudModule, C as ContentQueryOptions, N as NewsItem, c as ContentListResponse, S as Section, d as SignedMediaUrl, e as OrganizationBranding, M as MediaItem, f as MediaListResponse, g as SignedDocumentUrl, D as DocumentQueryOptions, h as DocumentItem, i as DocumentListResponse, j as DocumentFolder, k as DocumentFolderListResponse } from './useContent-Cr-3N5gS.js';
3
+ export { l as AnalyticsEventData, m as AnalyticsEventValue, n as AnalyticsPublicConfig, o as AnalyticsRuntime, p as AnalyticsRuntimeConfig, q as AxCloudConfig, B as BaseRole, r as ContentCollectionType, s as ContentDetailType, t as ContentItem, u as ContentSlotImage, v as ContentSlotMap, w as ContentSlotReader, x as ContentSlotValue, y as CustomRole, z as DocumentAudience, E as DocumentSourceProvider, F as DocumentStatus, G as Membership, H as OrganizationSettings, P as Page, I as PageContentState, J as PaginatedResponse, K as SectionPermissions, L as SystemRole, Q as createContentSlotReader, R as fetchAnalyticsPublicConfig, T as getContentSlotMap, V as isAllowedAnalyticsEvent, W as isLocalAnalyticsHostname, X as sanitizeAnalyticsEventData, Y as sanitizeAnalyticsPath, Z as useAnalytics, _ as useAnalyticsRuntime, $ as useAxCloudContext, a0 as useContent, a1 as useContentItem, a2 as usePageContent, a3 as userHasAllPermissions, a4 as userHasAnyPermission, a5 as userHasPermission } from './useContent-Cr-3N5gS.js';
4
4
  export { B as BarnsportActivitiesFilter, a as BarnsportActivity, b as BarnsportActivityListItem, c as BarnsportActivityLocation, d as BarnsportActivityResponse, e as BarnsportActivitySchedule, f as BarnsportInquirySubmissionRequest, g as BarnsportInterestSubmissionRequest, h as BarnsportInterestSubmissionResponse, i as BarnsportListResponse, j as BarnsportMunicipality, k as BarnsportRegistrationMethod, l as BarnsportSitemapResponse, m as BarnsportSitemapUrl, n as BarnsportSport, u as useBarnsportActivities, o as useBarnsportActivity, p as useBarnsportMunicipalities, q as useBarnsportSitemap, r as useBarnsportSport, s as useBarnsportSports, t as useSubmitBarnsportInterest } from './useBarnsport-DHyNF9GM.js';
5
5
  import React from 'react';
6
6
  import * as _tanstack_react_query from '@tanstack/react-query';
@@ -323,6 +323,11 @@ interface AxCloudProviderProps {
323
323
  /** Optional privacy-safe analytics collection through AxCloud. */
324
324
  analytics?: AxCloudAnalyticsOptions;
325
325
  auth0: {
326
+ /**
327
+ * Stable public AxCloud identity-provider identifier.
328
+ * Used only to isolate SDK-owned state across provider changes.
329
+ */
330
+ identityProviderId?: string;
326
331
  domain: string;
327
332
  clientId: string;
328
333
  redirectUri: string;
@@ -348,6 +353,7 @@ interface AxCloudProviderProps {
348
353
  * apiUrl="https://api.axcloud.app"
349
354
  * apiKey="your-api-key" // Required for public content access
350
355
  * auth0={{
356
+ * identityProviderId: "idp_customer_abc123",
351
357
  * domain: "auth.axcloud.app",
352
358
  * clientId: "xxx",
353
359
  * redirectUri: window.location.origin,
package/dist/index.js CHANGED
@@ -252,6 +252,7 @@ function createQueryClientOwnerSignature(config, subject) {
252
252
  config.stage,
253
253
  config.apiUrl,
254
254
  config.apiKey ?? null,
255
+ config.auth0.identityProviderId ?? null,
255
256
  config.auth0.domain,
256
257
  config.auth0.clientId,
257
258
  config.auth0.audience ?? null,