Created
July 22, 2019 14:37
-
-
Save ntakouris/07a4e7bde5b6300552598ed19487b810 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpPost(ApiRoutes.Identity.Refresh)] | |
public async Task<IActionResult> Refresh([FromBody] RefreshTokenRequest request) | |
{ | |
var authResponse = await _identityService.RefreshTokenAsync(request.Token, request.RefreshToken); | |
if (!authResponse.Success) | |
{ | |
return BadRequest(new AuthFailedResponse | |
{ | |
Errors = authResponse.Errors | |
}); | |
} | |
return Ok(new AuthSuccessResponse | |
{ | |
Token = authResponse.Token, | |
RefreshToken = authResponse.RefreshToken | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment