Skip to content

Commit

Permalink
feat: Expose saml connection sp_metadata_url property
Browse files Browse the repository at this point in the history
As part of the SAML Connection response, we now also return the 'sp_metadata_url'
property which someone can use it in order to configure faster the IdP
  • Loading branch information
chanioxaris committed Jan 29, 2024
1 parent f258bed commit 521e1ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions clerk/saml_connections.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type SAMLConnection struct {
IdpCertificate *string `json:"idp_certificate"`
AcsURL string `json:"acs_url"`
SPEntityID string `json:"sp_entity_id"`
SPMetadataURL string `json:"sp_metadata_url"`
Active bool `json:"active"`
Provider string `json:"provider"`
UserCount int64 `json:"user_count"`
Expand Down
10 changes: 6 additions & 4 deletions clerk/saml_connections_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ const (
"idp_entity_id": "test-idp-entity-id",
"idp_sso_url": "https://example.com/saml/sso",
"idp_certificate": "` + dummySAMLConnectionCertificate + `",
"acs_url": "` + "https://clerk.example.com/v1/saml/acs" + dummySAMLConnectionID + `",
"sp_entity_id": "` + "https://clerk.example.com/acs" + dummySAMLConnectionID + `",
"acs_url": "` + "https://clerk.example.com/v1/saml/acs/" + dummySAMLConnectionID + `",
"sp_entity_id": "` + "https://clerk.example.com/saml/" + dummySAMLConnectionID + `",
"sp_metadata_url": "` + "https://clerk.example.com/v1/saml/metadata/" + dummySAMLConnectionID + `",
"active": false,
"provider": "saml_custom",
"user_count": 3,
Expand All @@ -199,8 +200,9 @@ const (
"idp_entity_id": "test-idp-entity-id",
"idp_sso_url": "https://example.com/saml/sso",
"idp_certificate": "` + dummySAMLConnectionCertificate + `",
"acs_url": "` + "https://clerk.example.com/v1/saml/acs" + dummySAMLConnectionID + `",
"sp_entity_id": "` + "https://clerk.example.com/acs" + dummySAMLConnectionID + `",
"acs_url": "` + "https://clerk.example.com/v1/saml/acs/" + dummySAMLConnectionID + `",
"sp_entity_id": "` + "https://clerk.example.com/saml/" + dummySAMLConnectionID + `",
"sp_metadata_url": "` + "https://clerk.example.com/v1/saml/metadata/" + dummySAMLConnectionID + `",
"active": true,
"provider": "saml_custom",
"user_count": 3,
Expand Down

0 comments on commit 521e1ac

Please sign in to comment.