oidc: some comments
This commit is contained in:
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user