public IActionResult AuthCodeV1_Grant([FromQuery] AuthCodeV1 input) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } return(StatusCode((int)HttpStatusCode.NotImplemented)); }
public async ValueTask <UserJwtV1> AuthCode_GrantV1(AuthCodeV1 model) { var response = await Endpoints.AuthCode_AuthV1(model); if (response.IsSuccessStatusCode) { return(await response.Content.ReadAsAsync <UserJwtV1>().ConfigureAwait(false)); } throw new HttpRequestException(response.RequestMessage.ToString(), new Exception(response.ToString())); }
public async ValueTask <HttpResponseMessage> AuthCode_AuthV1(AuthCodeV1 model) { var content = Uri.EscapeUriString("?issuer_id=" + HttpUtility.UrlEncode(model.issuer_id) + "&client_id=" + HttpUtility.UrlEncode(model.client_id) + "&grant_type=" + model.grant_type + "&username="******"&redirect_uri=" + HttpUtility.UrlEncode(model.redirect_uri) + "&code=" + HttpUtility.UrlEncode(model.code) + "&state=" + HttpUtility.UrlEncode(model.state)); return(await _http.GetAsync("oauth2/v1/acg" + content)); }