public IActionResult Authorization([FromBody] UserRegistrationModel model) { var user = _userService.GetUser(model.Name, model.Password); var token = _sessionService.Authorize(user.Name); return(new JsonResult(new AuthorizationResultModel(token, user))); }
public async Task AuthorizeUserClient(int maxAttempts = 5) { if (_userApiClient.Authorized) { return; } await _sessionService.Authorize(_userApiClient, maxAttempts); }