public ApiMediator(IIwsClient client, HttpContextBase httpContext, IOAuthClientCredentialClient oauthClientCredentialClient) { this.client = client; this.httpContext = httpContext; this.oauthClientCredentialClient = oauthClientCredentialClient; }
public RegistrationController(Func<IOAuthClient> oauthClient, IIwsClient client, IAuthenticationManager authenticationManager) { this.oauthClient = oauthClient; this.client = client; this.authenticationManager = authenticationManager; }
public ApiErrorLog(IDictionary config) { this.apiClient = DependencyResolver.Current.GetService <IIwsClient>(); this.oauthClientCredentialClient = DependencyResolver.Current.GetService <IOAuthClientCredentialClient>(); this.httpContext = HttpContext.Current; ApplicationName = (string)(config["applicationName"] ?? string.Empty); }
public AccountController(IOAuthClient oauthClient, IAuthenticationManager authenticationManager, IIwsClient client, IUserInfoClient userInfoClient) { this.oauthClient = oauthClient; this.client = client; this.authenticationManager = authenticationManager; this.userInfoClient = userInfoClient; }
public RegistrationController(Func <IOAuthClient> oauthClient, IIwsClient client, IAuthenticationManager authenticationManager, Func <IOAuthClientCredentialClient> oauthClientCredentialClient) { this.oauthClient = oauthClient; this.client = client; this.authenticationManager = authenticationManager; this.oauthClientCredentialClient = oauthClientCredentialClient; }
public AccountController(IOAuthClient oauthClient, IAuthenticationManager authenticationManager, IIwsClient client, IUserInfoClient userInfoClient, IOAuthClientCredentialClient oauthClientCredentialClient) { this.oauthClient = oauthClient; this.client = client; this.authenticationManager = authenticationManager; this.userInfoClient = userInfoClient; this.oauthClientCredentialClient = oauthClientCredentialClient; }
public AccountControllerTests() { client = A.Fake<IIwsClient>(); controller = new AccountController(A.Fake<IOAuthClient>(), A.Fake<IAuthenticationManager>(), client, A.Fake<IUserInfoClient>()); var request = A.Fake<HttpRequestBase>(); var context = A.Fake<HttpContextBase>(); A.CallTo(() => request.Url).Returns(new Uri("https://test.com")); A.CallTo(() => context.Request).Returns(request); controller.ControllerContext = new ControllerContext(context, new RouteData(), controller); controller.Url = new UrlHelper(new RequestContext(context, new RouteData())); }
public AccountControllerTests() { client = A.Fake <IIwsClient>(); oauthClientCredentialClient = A.Fake <IOAuthClientCredentialClient>(); controller = new AccountController(A.Fake <IOAuthClient>(), A.Fake <IAuthenticationManager>(), client, A.Fake <IUserInfoClient>(), oauthClientCredentialClient); var request = A.Fake <HttpRequestBase>(); var context = A.Fake <HttpContextBase>(); A.CallTo(() => request.Url).Returns(new Uri("https://test.com")); A.CallTo(() => context.Request).Returns(request); controller.ControllerContext = new ControllerContext(context, new RouteData(), controller); controller.Url = new UrlHelper(new RequestContext(context, new RouteData())); }
public static async Task BindCountryList(this Controller controller, IIwsClient client, string accessToken, bool setDefaultAsUnitedKingdom = true) { var response = await client.SendAsync(accessToken, new GetCountries()); BindCountriesToViewBag(controller, response, setDefaultAsUnitedKingdom); }
public static async Task BindCountryList(this Controller controller, IIwsClient client, bool setDefaultAsUnitedKingdom = true) { var response = await client.SendAsync(new GetCountries()); BindCountriesToViewBag(controller, response, setDefaultAsUnitedKingdom); }