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 descope/internal/mgmt/sso_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,7 @@ func TestLoadXAASettingsSuccess(t *testing.T) {
"groupPriorityEnabled": true,
"allowOverrideRoles": true,
"providerID": "prov1",
"audience": "https://api.descope.com/v1/apps/P1",
}
mgmt := newTestMgmt(nil, helpers.DoOkWithBody(func(r *http.Request) {
require.Equal(t, r.Header.Get("Authorization"), "Bearer a:key")
Expand All @@ -1594,6 +1595,8 @@ func TestLoadXAASettingsSuccess(t *testing.T) {
assert.True(t, res.GroupPriorityEnabled)
assert.True(t, res.AllowOverrideRoles)
assert.EqualValues(t, "prov1", res.ProviderID)
// Read-only, project-level: no tenant segment - the tenant travels in the aud_tenant claim.
assert.EqualValues(t, "https://api.descope.com/v1/apps/P1", res.Audience)
}

func TestLoadXAASettingsErrorMissingTenantID(t *testing.T) {
Expand Down
4 changes: 4 additions & 0 deletions descope/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1744,6 +1744,10 @@ type SSOXAASettingsResponse struct {
GroupPriorityEnabled bool `json:"groupPriorityEnabled,omitempty"`
AllowOverrideRoles bool `json:"allowOverrideRoles,omitempty"`
ProviderID string `json:"providerID,omitempty"` // selected IdP provider template id (display metadata; mirrors SSOSAMLSettings providerID)
// Audience is 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 `json:"audience,omitempty"`
}

type SSOXAAAllSettingsResponse struct {
Expand Down
Loading