Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/management/sso.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,7 @@ describe('Management SSO', () => {
groupsMapping: [{ role: { id: 'r1', name: 'role1' }, groups: ['g1'] }],
defaultSSORoles: ['Member'],
providerID: 'okta',
audience: 'https://api.descope.com/v1/apps/P1',
};
const httpResponse = {
ok: true,
Expand All @@ -1010,6 +1011,8 @@ describe('Management SSO', () => {
const resp = await management.sso.loadXAASettings('t1', 'somessoid');
// providerID round-trips through transformXAASettingsResponse (no explicit copy needed).
expect(resp.data?.providerID).toBe('okta');
// Read-only, project-level: no tenant segment - the tenant travels in the aud_tenant claim.
expect(resp.data?.audience).toBe('https://api.descope.com/v1/apps/P1');

expect(mockHttpClient.get).toHaveBeenCalledWith(apiPaths.sso.xaa.settings, {
queryParams: { tenantId: 't1', ssoId: 'somessoid' },
Expand Down
4 changes: 4 additions & 0 deletions lib/management/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ export type XAASettingsResponse = {
groupPriorityEnabled?: boolean;
allowOverrideRoles?: boolean;
providerID?: string;
/** Read-only: the project-level audience a requesting application must present in its ID-JAG token.
* It carries no tenant segment - it equals the issuer the project publishes - so the identity
* provider must send the tenant id in the token's `aud_tenant` claim. */
audience?: string;
};

/** UpdateJWT response with a new JWT value with the added custom claims */
Expand Down
Loading