Skip to content

Instantly share code, notes, and snippets.

@hiranya911
Created December 28, 2019 23:51
Show Gist options
  • Save hiranya911/6ad4a2e5d941ad3ee6477dbd36540d30 to your computer and use it in GitHub Desktop.
Save hiranya911/6ad4a2e5d941ad3ee6477dbd36540d30 to your computer and use it in GitHub Desktop.
newConfig := (&auth.SAMLProviderConfigToCreate{}).
DisplayName("SAML provider for ABC Auto").
Enabled(true).
ID("saml.provider").
IDPEntityID("IDP_ENTITY_ID").
SSOURL("https://abcauto.com/saml/sso/1234/").
X509Certificates([]string{
"-----BEGIN CERTIFICATE-----\nCERT1...\n-----END CERTIFICATE-----",
"-----BEGIN CERTIFICATE-----\nCERT2...\n-----END CERTIFICATE-----",
}).
RPEntityID("RP_ENTITY_ID").
CallbackURL("https://xyz-auto-makers.firebaseapp.com/__/auth/handler")
saml, err := tenantClient.CreateSAMLProviderConfig(ctx, newConfig)
if err != nil {
log.Fatalf("error creating SAML provider: %v\n", err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment