diff --git a/phase-2/poc-2/AuthServer.js b/phase-2/poc-2/AuthServer.js index e177fb3..ae7bc00 100644 --- a/phase-2/poc-2/AuthServer.js +++ b/phase-2/poc-2/AuthServer.js @@ -7,7 +7,7 @@ class AuthServer { constructor(options) { console.log('AuthServer created with options', options); this.clients = options.clients; - this.scopePickerPort = options.scopePickerPort; + this.resourceHelperPort = options.resourceHelperPort; this.grants = {}; this.tickets = {}; this.scopes = {}; @@ -52,7 +52,7 @@ class AuthServer { }); } createCallbackUrl({ clientId, code, scope, state }) { - console.log('creating callback url', clientId, code, scope, state); + // console.log('creating callback url', clientId, code, scope, state); const codeStr = encodeURIComponent(code); const scopeStr = encodeURIComponent(scope); const stateStr = encodeURIComponent(state); @@ -61,8 +61,8 @@ class AuthServer { `scope=${scopeStr}&` + `state=${stateStr}`; } - createAllowUrl({ clientId, code, scope, state }) { - console.log('creating callback url', clientId, code, scope, state); + createAllowUrl({ clientId, scope, state }) { + // console.log('creating allow url', clientId, code, scope, state); const clientIdStr = encodeURIComponent(clientId); const scopeStr = encodeURIComponent(scope); const stateStr = encodeURIComponent(state); diff --git a/phase-2/poc-2/auth.js b/phase-2/poc-2/auth.js index 11d5b1f..3e2c430 100644 --- a/phase-2/poc-2/auth.js +++ b/phase-2/poc-2/auth.js @@ -18,7 +18,7 @@ const clients = { } }; const server = new AuthServer({ - scopePickerPort: 3003, + resourceHelperPort: 3003, clients }); @@ -36,12 +36,12 @@ function handleOverview(req, res, serverData) { } http.createServer(async (req, res) => { - console.log(req.url.toString()); + // console.log(req.url.toString()); if (req.url.startsWith('/callback')) { const upstreamCode = client.getCodeFromCallback(req.url); const upstreamScope = client.getScopeFromCallback(req.url); const upstreamState = client.getStateFromCallback(req.url); - console.log('callback', upstreamCode, upstreamScope, upstreamState); + // console.log('callback', upstreamCode, upstreamScope, upstreamState); const { clientState, clientId } = server.getTicket(upstreamState); const clientLabel = clients[clientId].label; const clientRedirectUri = clients[clientId].redirectUri; @@ -76,9 +76,9 @@ http.createServer(async (req, res) => { } else if (req.url?.startsWith('/authorize')) { const url_parts = url.parse(req.url, true); const query = url_parts.query; - console.log('new transaction', query); + // console.log('new transaction', query); if (query.scope == 'webdav-folder') { - console.log(`need to pick ${query.scope}!`); + // console.log(`need to pick ${query.scope}!`); if (query.state && query.client_id) { const clientState = query.state; const upstreamTicket = makeid('as-ticket-', 8); diff --git a/phase-2/poc-2/client.js b/phase-2/poc-2/client.js index 52e1463..0e2edb3 100644 --- a/phase-2/poc-2/client.js +++ b/phase-2/poc-2/client.js @@ -54,7 +54,7 @@ class Client { const scope = this.getScopeFromCallback(urlStr); const state = this.getStateFromCallback(urlStr); const scopeInfo = await this.fetchScopeInfo(code); - console.log('scope info', scopeInfo); + // console.log('scope info', scopeInfo); this.tokens[code] = { scopeInfo, scope, diff --git a/phase-2/poc-2/clientApp.js b/phase-2/poc-2/clientApp.js index 66745c5..f31a8ca 100644 --- a/phase-2/poc-2/clientApp.js +++ b/phase-2/poc-2/clientApp.js @@ -10,7 +10,7 @@ const client = new Client({ http.createServer(async (req, res) => { res.writeHead(200, {'Content-Type': 'text/html'}); - console.log(req.url.toString()); + // console.log(req.url.toString()); if (req.url.startsWith('/callback')) { res.end(await client.makeCallbackScreen(req.url)); } else { diff --git a/phase-2/poc-2/rh.js b/phase-2/poc-2/rh.js index f4452ea..e795472 100644 --- a/phase-2/poc-2/rh.js +++ b/phase-2/poc-2/rh.js @@ -63,7 +63,7 @@ function handleOverview(req, res, serverData) { } http.createServer((req, res) => { - console.log(req.url.toString()); + // console.log(req.url.toString()); if (req.url?.startsWith('/authorize')) { const url_parts = url.parse(req.url, true); const query = url_parts.query; @@ -97,7 +97,7 @@ http.createServer((req, res) => { const query = url_parts.query; const clientId = query.client_id; const state = query.state; - console.log(`new transaction; minting scope ${scopeId} with code ${code}`, query); + // console.log(`new transaction; minting scope ${scopeId} with code ${code}`, query); // FIXME: store this _after_ the user consents, not before! server.storeScopeInfo(scopeId, { type: "description",