public GoogleAuthenticationProvider(IOAuthConfiguration configuration, IConfigurationProvider configurationProvider) { _configurationProvider = configurationProvider; _clientId = configuration.ClientId; _clientSecret = configuration.ClientSecret; _redirectUri = configuration.RedirectUri; }
public OAuthOptionsFactory(OAuthAuthorizationProvider provider, IOAuthConfiguration options, OAuthJwtFormat format, IOAuthPathProvider pathProvider) { if (pathProvider == null) { throw new ArgumentNullException(nameof(pathProvider)); } if (format == null) { throw new ArgumentNullException(nameof(format)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } if (provider == null) { throw new ArgumentNullException(nameof(provider)); } this.provider = provider; this.options = options; this.format = format; this.pathProvider = pathProvider; }
public static string GetDataUrl(this IOAuthConfiguration configuration, string path) { Guard.AgainstNull(configuration, nameof(configuration)); Guard.AgainstNull(configuration.TokenUrl, nameof(configuration.TokenUrl)); return($"{configuration.DataUrl}{(configuration.DataUrl.EndsWith("/") ? string.Empty : "/")}{path}"); }
public static void ApplyInvariants(this IOAuthConfiguration configuration) { Guard.AgainstNull(configuration, nameof(configuration)); Guard.AgainstNullOrEmptyString(configuration.Name, nameof(configuration.Name)); Guard.AgainstNullOrEmptyString(configuration.ClientId, nameof(configuration.ClientId)); Guard.AgainstNullOrEmptyString(configuration.ClientSecret, nameof(configuration.ClientSecret)); }
public OAuthJwtFormat(IOAuthConfiguration config) { if (config == null) { throw new ArgumentNullException(nameof(config)); } this.config = config; }
public JwtBearerAuthenticationOptionsFactory(IOAuthConfiguration oauthConfig) { if (oauthConfig == null) { throw new ArgumentNullException(nameof(oauthConfig)); } this.oauthConfig = oauthConfig; }
public void Add(IOAuthConfiguration configuration) { Guard.AgainstNull(configuration, nameof(configuration)); configuration.ApplyInvariants(); if (_credentials.ContainsKey(configuration.Name)) { throw new ApplicationException(string.Format(Resources.DuplicateNameException, configuration.Name, "OAuth")); } _credentials.Add(configuration.Name, configuration); }
public GoogleController(IFormsAuthenticationService formsAuthenticationService, IOAuthConfiguration oAuthConfiguration) { if (formsAuthenticationService == null) { throw new ArgumentNullException("formsAuthenticationService"); } if (oAuthConfiguration == null) { throw new ArgumentNullException("oAuthConfiguration"); } this.formsAuthenticationService = formsAuthenticationService; this.oAuthConfiguration = oAuthConfiguration; }
public RestClient() { _oAuthConfiguration = new OAuthConfiguration(); }
public RestClient(IOAuthConfiguration oAuthConfiguration) { _oAuthConfiguration = oAuthConfiguration; }
public TwitterApi(IOAuthConfiguration config) { ///bad }
public OAuthTwitterWrapper(IOAuthConfiguration authConfig, ITwitterConfiguration twitConfig) { _authConfig = authConfig; _twitConfig = twitConfig; }
public void Setup() { oAuthConfiguration = MockRepository.GenerateStub<IOAuthConfiguration>(); restClient = new RestClient(oAuthConfiguration); }