예제 #1
0
        public IActionResult AuthCodeV1_Grant([FromQuery] AuthCodeV1 input)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            return(StatusCode((int)HttpStatusCode.NotImplemented));
        }
예제 #2
0
파일: StsService.cs 프로젝트: bhbk/x9et3y6s
        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()));
        }
예제 #3
0
        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));
        }