// private readonly EmailService _emailService;

        public UsersController(UserService userService, FacebookAuthService facebookAuthService, GoogleAuthService googleAuthService)
        {
            _userService         = userService;
            _facebookAuthService = facebookAuthService;
            _googleAuthService   = googleAuthService;
            // _emailService = emailService;
        }
Exemplo n.º 2
0
 public LoginUserHandler(
     ILogger <LoginUserHandler> logger,
     ApplicationContext db,
     IHttpContextAccessor accessor,
     GoogleAuthService googleAuthService,
     DateTimeService dateTimeService)
 {
     _logger            = logger;
     _db                = db;
     _accessor          = accessor;
     _googleAuthService = googleAuthService;
     _dateTimeService   = dateTimeService;
 }
 public AccountController(
     UserManager <AppUser> userManager,
     SignInManager <AppUser> signInManager,
     IConfiguration configuration,
     GoogleAuthService googleAuthService,
     FacebookAuthService facebookAuthService
     )
 {
     _facebookAuthService = facebookAuthService;
     _googleAuthService   = googleAuthService;
     _userManager         = userManager;
     _signInManager       = signInManager;
     _configuration       = configuration;
 }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            var authService = new GoogleAuthService();

            var auth = authService.Login().GetAwaiter().GetResult();
            //authService.RefreshToken(auth).GetAwaiter().GetResult();

            var livros = new GoogleBooksService().PesquisarLivros("Use a cabeça!");

            foreach (var item in livros)
            {
            }

            Console.ReadKey();
        }
Exemplo n.º 5
0
 public BudgetController(IHttpClientFactory clientFactory,
                         ILogger <BudgetController> log,
                         IUserManagementService userManagementService,
                         SpreadsheetGeneratingService spreadsheetGeneratingService,
                         IBudgetsService budgetsService,
                         JwtToken jwtToken,
                         GoogleAuthService googleAuthService,
                         IMemoryCache memoryCache,
                         SubscriberService subscriberService)
 {
     _clientFactory         = clientFactory ?? throw new ArgumentNullException(nameof(clientFactory));
     _log                   = log ?? throw new ArgumentNullException(nameof(log));
     _userManagementService =
         userManagementService ?? throw new ArgumentNullException(nameof(userManagementService));
     _spreadsheetGeneratingService = spreadsheetGeneratingService ??
                                     throw new ArgumentNullException(nameof(spreadsheetGeneratingService));
     _budgetsService    = budgetsService ?? throw new ArgumentNullException(nameof(budgetsService));
     _jwtToken          = jwtToken;
     _googleAuthService = googleAuthService ?? throw new ArgumentNullException(nameof(googleAuthService));
     _memoryCache       = memoryCache ?? throw new ArgumentNullException(nameof(memoryCache));
     _subscriberService = subscriberService ?? throw new ArgumentNullException(nameof(subscriberService));
 }
Exemplo n.º 6
0
 public UserLogic(IEmailService emailService)
 {
     _authService  = new GoogleAuthService();
     _emailService = emailService;
 }