oidc: put clients into the db
This commit is contained in:
@@ -388,10 +388,6 @@ async function initializeExpressSync() {
|
||||
|
||||
app.use(oidcPrefix, oidcProvider.callback());
|
||||
|
||||
// FIXME this should come from the database
|
||||
await oidc.upsertClient(oidcProvider, 'foo', 'bar', 'https://openidconnect.net/callback');
|
||||
await oidc.upsertClient(oidcProvider, 'oidcdebugger', 'bar', 'https://oidcdebugger.com/debug');
|
||||
|
||||
// disable server socket "idle" timeout. we use the timeout middleware to handle timeouts on a route level
|
||||
// we rely on nginx for timeouts on the TCP level (see client_header_timeout)
|
||||
httpServer.setTimeout(0);
|
||||
@@ -438,6 +434,8 @@ async function start() {
|
||||
|
||||
await util.promisify(gHttpServer.listen.bind(gHttpServer))(constants.PORT, '127.0.0.1');
|
||||
await safe(eventlog.add(eventlog.ACTION_START, { userId: null, username: 'boot' }, { version: constants.VERSION })); // can fail if db down
|
||||
|
||||
try { await oidc.clients.add('foo', 'bar', 'https://openidconnect.net/callback'); } catch (e) { console.log('Client already exists', e); }
|
||||
}
|
||||
|
||||
async function stop() {
|
||||
|
||||
Reference in New Issue
Block a user