示例#1
0
 public SsoConfigDataViewModel(SsoConfigurationData configurationData, GlobalSettings globalSettings,
                               Guid organizationId)
 {
     ConfigType                       = configurationData.ConfigType;
     Authority                        = configurationData.Authority;
     ClientId                         = configurationData.ClientId;
     ClientSecret                     = configurationData.ClientSecret;
     CallbackPath                     = configurationData.BuildCallbackPath(globalSettings.BaseServiceUri.Sso);
     SignedOutCallbackPath            = configurationData.BuildSignedOutCallbackPath(globalSettings.BaseServiceUri.Sso);
     MetadataAddress                  = configurationData.MetadataAddress;
     RedirectBehavior                 = configurationData.RedirectBehavior;
     GetClaimsFromUserInfoEndpoint    = configurationData.GetClaimsFromUserInfoEndpoint;
     SpEntityId                       = configurationData.BuildSaml2ModulePath(globalSettings.BaseServiceUri.Sso);
     SpAcsUrl                         = configurationData.BuildSaml2AcsUrl(globalSettings.BaseServiceUri.Sso, organizationId.ToString());
     IdpEntityId                      = configurationData.IdpEntityId;
     IdpBindingType                   = configurationData.IdpBindingType;
     IdpSingleSignOnServiceUrl        = configurationData.IdpSingleSignOnServiceUrl;
     IdpSingleLogoutServiceUrl        = configurationData.IdpSingleLogoutServiceUrl;
     IdpArtifactResolutionServiceUrl  = configurationData.IdpArtifactResolutionServiceUrl;
     IdpX509PublicCert                = configurationData.IdpX509PublicCert;
     IdpOutboundSigningAlgorithm      = configurationData.IdpOutboundSigningAlgorithm;
     IdpAllowUnsolicitedAuthnResponse = configurationData.IdpAllowUnsolicitedAuthnResponse;
     IdpDisableOutboundLogoutRequests = configurationData.IdpDisableOutboundLogoutRequests;
     IdpWantAuthnRequestsSigned       = configurationData.IdpWantAuthnRequestsSigned;
     SpNameIdFormat                   = configurationData.SpNameIdFormat;
     SpOutboundSigningAlgorithm       = configurationData.SpOutboundSigningAlgorithm ?? SamlSigningAlgorithms.Sha256;
     SpSigningBehavior                = configurationData.SpSigningBehavior;
     SpWantAssertionsSigned           = configurationData.SpWantAssertionsSigned;
     SpValidateCertificates           = configurationData.SpValidateCertificates;
 }
 public SsoUrls(string organizationId, GlobalSettings globalSettings)
 {
     CallbackPath          = SsoConfigurationData.BuildCallbackPath(globalSettings.BaseServiceUri.Sso);
     SignedOutCallbackPath = SsoConfigurationData.BuildSignedOutCallbackPath(globalSettings.BaseServiceUri.Sso);
     SpEntityId            = SsoConfigurationData.BuildSaml2ModulePath(globalSettings.BaseServiceUri.Sso);
     SpMetadataUrl         = SsoConfigurationData.BuildSaml2MetadataUrl(globalSettings.BaseServiceUri.Sso, organizationId);
     SpAcsUrl = SsoConfigurationData.BuildSaml2AcsUrl(globalSettings.BaseServiceUri.Sso, organizationId);
 }