public IActionResult Token([FromBody] BasicAuthClaims user) { try { TokenResponse tokenResponse = accountIdentityProvider.GetIdentity(user); return(Ok(tokenResponse)); } catch (ArgumentException ex) { return(BadRequest(ex.Message)); } }
public async Task <IActionResult> Token([FromBody] BasicAuthClaims user) { try { // get token TokenResponse tokenResponse = await accountIdentityProvider.GetIdentity(user) .ConfigureAwait(false); return(Ok(tokenResponse)); } catch (ArgumentNullException ex) { return(BadRequest(ex.Message)); } }