Skip to content

Commit

Permalink
fix: remove empty access application attributes
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Provost <[email protected]>
  • Loading branch information
BSFishy committed Aug 8, 2024
1 parent 80d52bc commit 0d6f00a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .changelog/2838.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-notes:bug
access_application: enable removing access application attributes
```
18 changes: 9 additions & 9 deletions access_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ type SaasApplication struct {
AuthType string `json:"auth_type,omitempty"`

// SAML saas app
ConsumerServiceUrl string `json:"consumer_service_url,omitempty"`
SPEntityID string `json:"sp_entity_id,omitempty"`
IDPEntityID string `json:"idp_entity_id,omitempty"`
NameIDFormat string `json:"name_id_format,omitempty"`
SSOEndpoint string `json:"sso_endpoint,omitempty"`
DefaultRelayState string `json:"default_relay_state,omitempty"`
CustomAttributes []SAMLAttributeConfig `json:"custom_attributes,omitempty"`
NameIDTransformJsonata string `json:"name_id_transform_jsonata,omitempty"`
SamlAttributeTransformJsonata string `json:"saml_attribute_transform_jsonata"`
ConsumerServiceUrl string `json:"consumer_service_url,omitempty"`
SPEntityID string `json:"sp_entity_id,omitempty"`
IDPEntityID string `json:"idp_entity_id,omitempty"`
NameIDFormat string `json:"name_id_format,omitempty"`
SSOEndpoint string `json:"sso_endpoint,omitempty"`
DefaultRelayState string `json:"default_relay_state,omitempty"`
CustomAttributes *[]SAMLAttributeConfig `json:"custom_attributes"`
NameIDTransformJsonata string `json:"name_id_transform_jsonata,omitempty"`
SamlAttributeTransformJsonata string `json:"saml_attribute_transform_jsonata"`

// OIDC saas app
ClientID string `json:"client_id,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion access_application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ func TestCreateSAMLSaasAccessApplications(t *testing.T) {
SPEntityID: "dash.example.com",
NameIDFormat: "id",
DefaultRelayState: "https://saas.example.com",
CustomAttributes: []SAMLAttributeConfig{
CustomAttributes: &[]SAMLAttributeConfig{
{
Name: "test1",
NameFormat: "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified",
Expand Down

0 comments on commit 0d6f00a

Please sign in to comment.