Exemple #1
0
        public async Task <IActionResult> RefreshToken([FromBody] JToken jsonBody)
        {
            var refreshToken = jsonBody.Value <string>("refreshToken");
            var token        = await _tokenStoreService.FindTokenLoginAsync(refreshToken);

            var(accessToken, newRefreshToken) = await _tokenStoreService.CreateJwtTokens(token.User, refreshToken);

            return(Ok(GetRequestResult(new { access_token = accessToken, refresh_token = newRefreshToken })));
        }