This commit is contained in:
2019-10-01 22:33:14 +00:00
parent 9c5a0f2ae1
commit a3fcf052a3
2 changed files with 5 additions and 7 deletions

2
.vscode/launch.json vendored
View File

@@ -36,7 +36,7 @@
//"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)",
//https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#specifying-the-browsers-url
"pattern": "^\\s*Now listening on:\\s+https://\\S+:([0-9]+)",
"uriFormat": "https://localhost:%s/start/222"
"uriFormat": "https://localhost:%s/start/2827706062985642634"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"

View File

@@ -1,12 +1,9 @@
using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Net.Http;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using System.Net.Http.Formatting;
namespace qbridge.Controllers
{
@@ -128,7 +125,7 @@ namespace qbridge.Controllers
// Redirect endpoint
//Step 4 here: https://developer.intuit.com/app/developer/qbo/docs/develop/authentication-and-authorization/openid-connect
[HttpGet("redirect")]
public async Task<IActionResult> GetAsync([FromQuery]string state, [FromQuery]string code, [FromQuery]string realmId)
public async Task<IActionResult> GetAsync([FromQuery] string state, [FromQuery]string code, [FromQuery]string realmId)
{
//NOTE: state is our own state provided in the initial auth redirect
//code is authorization code used to then get the refresh and access token
@@ -194,7 +191,8 @@ namespace qbridge.Controllers
refresh_token = refresh_token,
x_refresh_token_expires_in = x_refresh_token_expires_in,
realmId = realmId,
code = code
code = code,
state = state
});
//return Content($"ACCESS TOKEN: {access_token}, REFRESH TOKEN: {refresh_token}, REALM:{realmId}, STATE:{state}, CODE:{code}");