oidc: some comments

This commit is contained in:
Girish Ramakrishnan
2025-07-13 15:28:47 +02:00
parent 04de621e37
commit a7e507a137
2 changed files with 6 additions and 5 deletions
+3 -1
View File
@@ -86,7 +86,9 @@ async function list(req, res, next) {
const [error, result] = await safe(oidcClients.list());
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(200, { clients: result.filter(client => !client.appId) }));
const clients = result.filter(client => !client.appId); // filter out oidc and proxyauth addon clients
next(new HttpSuccess(200, { clients }));
}
async function del(req, res, next) {
+3 -4
View File
@@ -1828,8 +1828,7 @@ async function setupProxyAuth(app, options) {
debug('Creating OpenID client for proxyAuth');
// openid client_id is appId for now
const [error, result] = await safe(oidcClients.get(app.id));
if (error) throw error;
const result = await oidcClients.get(app.id);
// ensure we keep the secret
const data = {
@@ -2144,7 +2143,7 @@ async function setupOidc(app, options) {
if (!app.sso) return;
debug('Setting up OpenID connect');
debug('Setting up OIDC');
// openid client_id is appId for now
const [error, result] = await safe(oidcClients.get(app.id));
@@ -2169,7 +2168,7 @@ async function teardownOidc(app, options) {
assert.strictEqual(typeof app, 'object');
assert.strictEqual(typeof options, 'object');
debug('Tearing down OpenID connect');
debug('Tearing down OIDC');
const [error] = await safe(oidcClients.del(app.id));
if (error && error.reason !== BoxError.NOT_FOUND) throw error;