Esempio n. 1
0
        public async Task <IActionResult> Token(
            string grant_type,
            string code,
            string redirect_uri,
            string client_id)
        {
            UserToken userToken = await _userTokenRepository.GetAsync(code);

            if (userToken is null || userToken.IsCanceled || redirect_uri != userToken.RedirectUri)
            {
                return(BadRequest(new { error = "invalid_request" }));
            }