From e3ab324d59ee04870007e5078901a22e4dd81440 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Tue, 12 Oct 2021 13:57:08 +0200 Subject: [PATCH] Fix OrganizationSsoResponse not behaving correctly in production (#515) --- .../organization/organizationSsoResponse.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/src/models/response/organization/organizationSsoResponse.ts b/common/src/models/response/organization/organizationSsoResponse.ts index 0b7d94a822..46709d61de 100644 --- a/common/src/models/response/organization/organizationSsoResponse.ts +++ b/common/src/models/response/organization/organizationSsoResponse.ts @@ -10,14 +10,23 @@ export class OrganizationSsoResponse extends BaseResponse { super(response); this.enabled = this.getResponseProperty('Enabled'); this.data = new SsoConfigApi(this.getResponseProperty('Data')); - this.urls = this.getResponseProperty('Urls'); + this.urls = new SsoUrls(this.getResponseProperty('Urls')); } } -type SsoUrls = { +class SsoUrls extends BaseResponse { callbackPath: string; signedOutCallbackPath: string; spEntityId: string; spMetadataUrl: string; spAcsUrl: string; -}; + + constructor(response: any) { + super(response); + this.callbackPath = this.getResponseProperty('CallbackPath'); + this.signedOutCallbackPath = this.getResponseProperty('SignedOutCallbackPath'); + this.spEntityId = this.getResponseProperty('SpEntityId'); + this.spMetadataUrl = this.getResponseProperty('SpMetadataUrl'); + this.spAcsUrl = this.getResponseProperty('SpAcsUrl'); + } +}