This commit is contained in:
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@@ -35,8 +35,8 @@
|
||||
"action": "openExternally",
|
||||
//"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+http://\\S+:([0-9]+)",
|
||||
"uriFormat": "http://localhost:%s/start/"
|
||||
"pattern": "^\\s*Now listening on:\\s+https://\\S+:([0-9]+)",
|
||||
"uriFormat": "https://localhost:%s/start/222"
|
||||
},
|
||||
"env": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace qbridge.Controllers
|
||||
public const string CLIENT_SECRET = "XUmJyvEcEuwQuyhARUAm0a8G3gzbEAeMiATCLyFZ";
|
||||
|
||||
#if (DEBUG)
|
||||
public const string REDIRECT_URI = "https://localhost:5001/redirect";
|
||||
public const string REDIRECT_URI = "https://localhost:3003/redirect";
|
||||
#else
|
||||
public const string REDIRECT_URI = "https://qboauth.ayanova.com/redirect";
|
||||
#endif
|
||||
@@ -70,7 +70,7 @@ namespace qbridge.Controllers
|
||||
{
|
||||
_clientFactory = clientFactory;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -181,7 +181,22 @@ namespace qbridge.Controllers
|
||||
AccessTokenObject = null;
|
||||
}
|
||||
|
||||
return Content($"TOKEN: {AccessTokenObject.ToString()}");
|
||||
|
||||
var refresh_token = AccessTokenObject["refresh_token"].Value<string>();
|
||||
var access_token = AccessTokenObject["access_token"].Value<string>();
|
||||
var x_refresh_token_expires_in = AccessTokenObject["x_refresh_token_expires_in"].Value<long>();
|
||||
var access_token_expires_in = AccessTokenObject["expires_in"].Value<long>();
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
access_token = access_token,
|
||||
access_token_expires_in = access_token_expires_in,
|
||||
refresh_token = refresh_token,
|
||||
x_refresh_token_expires_in = x_refresh_token_expires_in,
|
||||
realmId = realmId,
|
||||
code = code
|
||||
});
|
||||
//return Content($"ACCESS TOKEN: {access_token}, REFRESH TOKEN: {refresh_token}, REALM:{realmId}, STATE:{state}, CODE:{code}");
|
||||
|
||||
/*
|
||||
Actual response example:
|
||||
|
||||
@@ -12,7 +12,11 @@ namespace qbridge
|
||||
|
||||
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
#if (DEBUG)
|
||||
.UseUrls("https://*:3003")
|
||||
#else
|
||||
.UseUrls("http://*:3003")
|
||||
.UseStartup<Startup>();
|
||||
#endif
|
||||
.UseStartup<Startup>();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user