Skip to content

Commit

Permalink
Adding to tests and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Vedder authored and sergiught committed Jul 6, 2022
1 parent 87b3bcb commit a88f0b8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
8 changes: 8 additions & 0 deletions auth0/resource_auth0_connection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1341,6 +1341,8 @@ func TestAccConnectionSAML(t *testing.T) {
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.entity_id", ""),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.idp_initiated.0.client_authorize_query", "type=code&timeout=30"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.fields_map", "{\"email\":[\"emailaddress\",\"nameidentifier\"],\"family_name\":\"surname\",\"name\":[\"name\",\"nameidentifier\"]}"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.metadata_url", ""),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.metadata_xml", "<?xml version=\"1.0\" encoding=\"utf-8\"?><EntityDescriptor ID=\"_391f377b-78d8-54132-1d47-a130e933bb1c\" entityID=\"https://example.com\" xmlns=\"urn:oasis:names:tc:SAML:2.0:metadata\"></EntityDescriptor>"),
),
},
{
Expand All @@ -1353,6 +1355,8 @@ func TestAccConnectionSAML(t *testing.T) {
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.disable_sign_out", "true"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.entity_id", "example"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.fields_map", "{\"email\":[\"emailaddress\",\"nameidentifier\"],\"family_name\":\"appelido\",\"name\":[\"name\"]}"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.metadata_url", "https://saml.provider/imi/ns/FederationMetadata.xml"),
resource.TestCheckResourceAttr("auth0_connection.my_connection", "options.0.metadata_xml", ""),
),
},
},
Expand Down Expand Up @@ -1412,6 +1416,8 @@ EOF
client_protocol = "samlp"
client_authorize_query = "type=code&timeout=30"
}
metadata_xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?><EntityDescriptor ID=\"_391f377b-78d8-54132-1d47-a130e933bb1c\" entityID=\"https://example.com\" xmlns=\"urn:oasis:names:tc:SAML:2.0:metadata\"></EntityDescriptor>"
metadata_url = ""
}
}
`
Expand Down Expand Up @@ -1467,6 +1473,8 @@ EOF
client_protocol = "samlp"
client_authorize_query = "type=code&timeout=60"
}
metadata_xml = ""
metadata_url = "https://saml.provider/imi/ns/FederationMetadata.xml"
}
}
`
Loading

0 comments on commit a88f0b8

Please sign in to comment.