diff --git a/.changelog/1281.txt b/.changelog/1281.txt new file mode 100644 index 00000000000..9fb7f58d306 --- /dev/null +++ b/.changelog/1281.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +Added self_hosted_domains to access apps +``` diff --git a/access_application.go b/access_application.go index e627fca27ce..bd49cf2c301 100644 --- a/access_application.go +++ b/access_application.go @@ -31,6 +31,7 @@ type AccessApplication struct { LogoURL string `json:"logo_url,omitempty"` AUD string `json:"aud,omitempty"` Domain string `json:"domain"` + SelfHostedDomains []string `json:"self_hosted_domains"` Type AccessApplicationType `json:"type,omitempty"` SessionDuration string `json:"session_duration,omitempty"` SameSiteCookieAttribute string `json:"same_site_cookie_attribute,omitempty"` diff --git a/access_application_test.go b/access_application_test.go index ce488347d2a..4275f452508 100644 --- a/access_application_test.go +++ b/access_application_test.go @@ -116,6 +116,7 @@ func TestAccessApplication(t *testing.T) { "aud": "737646a56ab1df6ec9bddc7e5ca84eaf3b0768850f3ffb5d74f1534911fe3893", "name": "Admin Site", "domain": "test.example.com/admin", + "self_hosted_domains": ["test.example.com/admin", "test.example.com/admin2"], "type": "self_hosted", "session_duration": "24h", "allowed_idps": ["f174e90a-fafe-4643-bbbc-4a0ed4fc8415"], @@ -144,6 +145,7 @@ func TestAccessApplication(t *testing.T) { AUD: "737646a56ab1df6ec9bddc7e5ca84eaf3b0768850f3ffb5d74f1534911fe3893", Name: "Admin Site", Domain: "test.example.com/admin", + SelfHostedDomains: []string{"test.example.com/admin", "test.example.com/admin2"}, Type: "self_hosted", SessionDuration: "24h", AllowedIdps: []string{"f174e90a-fafe-4643-bbbc-4a0ed4fc8415"}, @@ -194,6 +196,7 @@ func TestCreateAccessApplications(t *testing.T) { "aud": "737646a56ab1df6ec9bddc7e5ca84eaf3b0768850f3ffb5d74f1534911fe3893", "name": "Admin Site", "domain": "test.example.com/admin", + "self_hosted_domains": ["test.example.com/admin", "test.example.com/admin2"], "type": "self_hosted", "session_duration": "24h", "allowed_idps": ["f174e90a-fafe-4643-bbbc-4a0ed4fc8415"], @@ -216,6 +219,7 @@ func TestCreateAccessApplications(t *testing.T) { ID: "480f4f69-1a28-4fdd-9240-1ed29f0ac1db", Name: "Admin Site", Domain: "test.example.com/admin", + SelfHostedDomains: []string{"test.example.com/admin", "test.example.com/admin2"}, Type: "self_hosted", SessionDuration: "24h", AUD: "737646a56ab1df6ec9bddc7e5ca84eaf3b0768850f3ffb5d74f1534911fe3893", @@ -275,6 +279,7 @@ func TestUpdateAccessApplication(t *testing.T) { "aud": "737646a56ab1df6ec9bddc7e5ca84eaf3b0768850f3ffb5d74f1534911fe3893", "name": "Admin Site", "domain": "test.example.com/admin", + "self_hosted_domains": ["test.example.com/admin", "test.example.com/admin2"], "type": "self_hosted", "session_duration": "24h", "allowed_idps": ["f174e90a-fafe-4643-bbbc-4a0ed4fc8415"], @@ -297,6 +302,7 @@ func TestUpdateAccessApplication(t *testing.T) { ID: "480f4f69-1a28-4fdd-9240-1ed29f0ac1db", Name: "Admin Site", Domain: "test.example.com/admin", + SelfHostedDomains: []string{"test.example.com/admin", "test.example.com/admin2"}, Type: "self_hosted", SessionDuration: "24h", AUD: "737646a56ab1df6ec9bddc7e5ca84eaf3b0768850f3ffb5d74f1534911fe3893",