public async Task <IApiClientProvider> CreateInstanceAsync()
        {
            var instance = _factoryService
                           .InstanceOf <IApiClientProvider>()
                           .UseJsonContentType()
                           .UseBaseUrl(_configuration.ApiUrl);

            var user = await _loggedUserService.GetLoggedUserAsync <MyLoggedUser>();

            instance.UseAuthenticationBearer(user?.Data?.AccessToken);

            return(instance);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> GetAsync()
        {
            var user = await _loggedUserService.GetLoggedUserAsync <MyLoggedUser>();

            return(Ok(user));
        }