This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -36,7 +36,7 @@
|
|||||||
//"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)",
|
//"pattern": "^\\s*Now listening on:\\s+(https?://\\S+)",
|
||||||
//https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#specifying-the-browsers-url
|
//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]+)",
|
"pattern": "^\\s*Now listening on:\\s+https://\\S+:([0-9]+)",
|
||||||
"uriFormat": "https://localhost:%s/start/222"
|
"uriFormat": "https://localhost:%s/start/2827706062985642634"
|
||||||
},
|
},
|
||||||
"env": {
|
"env": {
|
||||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
|||||||
@@ -1,12 +1,9 @@
|
|||||||
|
using System;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using System.Net.Http.Formatting;
|
|
||||||
|
|
||||||
namespace qbridge.Controllers
|
namespace qbridge.Controllers
|
||||||
{
|
{
|
||||||
@@ -128,7 +125,7 @@ namespace qbridge.Controllers
|
|||||||
// Redirect endpoint
|
// Redirect endpoint
|
||||||
//Step 4 here: https://developer.intuit.com/app/developer/qbo/docs/develop/authentication-and-authorization/openid-connect
|
//Step 4 here: https://developer.intuit.com/app/developer/qbo/docs/develop/authentication-and-authorization/openid-connect
|
||||||
[HttpGet("redirect")]
|
[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
|
//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
|
//code is authorization code used to then get the refresh and access token
|
||||||
@@ -194,7 +191,8 @@ namespace qbridge.Controllers
|
|||||||
refresh_token = refresh_token,
|
refresh_token = refresh_token,
|
||||||
x_refresh_token_expires_in = x_refresh_token_expires_in,
|
x_refresh_token_expires_in = x_refresh_token_expires_in,
|
||||||
realmId = realmId,
|
realmId = realmId,
|
||||||
code = code
|
code = code,
|
||||||
|
state = state
|
||||||
});
|
});
|
||||||
//return Content($"ACCESS TOKEN: {access_token}, REFRESH TOKEN: {refresh_token}, REALM:{realmId}, STATE:{state}, CODE:{code}");
|
//return Content($"ACCESS TOKEN: {access_token}, REFRESH TOKEN: {refresh_token}, REALM:{realmId}, STATE:{state}, CODE:{code}");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user