Пример #1
0
 private void ValidateFacebookConfig(IPeopleConnectApplicationConfig config)
 {
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfBlank(config.AppId, Strings.InvalidConfigurationMissingFacebookAppId);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfMatches(config.AppId, CachedPeopleConnectApplicationConfig.KnownInvalidAppIds, StringComparer.OrdinalIgnoreCase, Strings.InvalidConfigurationFacebookAppId);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfBlank(config.AppSecretEncrypted, Strings.InvalidConfigurationMissingFacebookAppSecret);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfMatches(config.AppSecretClearText, CachedPeopleConnectApplicationConfig.KnownInvalidAppSecrets, StringComparer.OrdinalIgnoreCase, Strings.InvalidConfigurationFacebookAppSecret);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfBlank(config.AuthorizationEndpoint, Strings.InvalidConfigurationMissingFacebookAuthorizationEndpoint);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfBlank(config.GraphTokenEndpoint, Strings.InvalidConfigurationMissingFacebookGraphTokenEndpoint);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfBlank(config.GraphApiEndpoint, Strings.InvalidConfigurationMissingFacebookGraphApiEndpoint);
 }
Пример #2
0
 private void ValidateLinkedInConfig(IPeopleConnectApplicationConfig config)
 {
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfBlank(config.AccessTokenEndpoint, Strings.InvalidConfigurationMissingLinkedInAccessTokenEndpoint);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfBlank(config.AppId, Strings.InvalidConfigurationMissingLinkedInAppId);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfMatches(config.AppId, CachedPeopleConnectApplicationConfig.KnownInvalidAppIds, StringComparer.OrdinalIgnoreCase, Strings.InvalidConfigurationLinkedInAppId);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfBlank(config.AppSecretEncrypted, Strings.InvalidConfigurationMissingLinkedInAppSecret);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfMatches(config.AppSecretClearText, CachedPeopleConnectApplicationConfig.KnownInvalidAppSecrets, StringComparer.OrdinalIgnoreCase, Strings.InvalidConfigurationLinkedInAppSecret);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfBlank(config.RequestTokenEndpoint, Strings.InvalidConfigurationMissingLinkedInRequestTokenEndpoint);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfBlank(config.ConnectionsEndpoint, Strings.InvalidConfigurationMissingLinkedInConnectionsEndpoint);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfBlank(config.ProfileEndpoint, Strings.InvalidConfigurationMissingLinkedInProfileEndpoint);
     CachedPeopleConnectApplicationConfig.ThrowExchangeConfigurationExceptionIfBlank(config.RemoveAppEndpoint, Strings.InvalidConfigurationMissingLinkedInInvalidateTokenEndpoint);
 }