03. Applications/App.Api/Controllers/TokenController.cs
/// <summary>
/// Refreshes tokens. User should be authorized to be able to refresh the token.
/// </summary>
/// <returns>Token</returns>
Refreshes tokens. User should be authorized to be able to refresh the token.
Refreshes tokens . User should be authorized to be able to refresh the token .
[Authorize]
        [HttpGet]
        public async Task<IActionResult> RefreshToken()
        {
            var id = Guid.Parse(User.Claims.First(c => c.Type == CommunereClaimTypes.Id).Value);
            var command = new RefreshTokenCommand(id);
            var tokenDto = await _mediator.Send(command);
            return tokenDto.ToActionResult();
        }
[ Authorize ] [ HttpGet ] public async Task < IActionResult > RefreshToken ( ) { var id = Guid . Parse ( User . Claims . First ( c => c . Type == CommunereClaimTypes . Id ) . Value ) ; var command = new RefreshTokenCommand ( id ) ; var tokenDto = await _mediator . Send ( command ) ; return tokenDto . ToActionResult ( ) ; }
Refreshes tokens.
Refreshes tokens .
None