From 2c97b89524cb57757bf324ffd2cde5afef140f97 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Mon, 22 Sep 2014 17:08:27 -0700 Subject: [PATCH] Show oauth client credentials in webadmin --- src/clientdb.js | 2 +- webadmin/views/security.html | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/clientdb.js b/src/clientdb.js index 504b5dfe5..fc60977a7 100644 --- a/src/clientdb.js +++ b/src/clientdb.js @@ -107,7 +107,7 @@ function getActiveClientsByUserId(userId, callback) { assert(typeof userId === 'string'); assert(typeof callback === 'function'); - database.all('SELECT tokens.accessToken,tokens.clientId,clients.name,scope,COUNT(*) AS tokens FROM tokens,clients WHERE tokens.clientId=clients.id AND userId=? GROUP BY tokens.clientId', [ userId ], function (error, results) { + database.all('SELECT tokens.accessToken,clients.clientId,clients.clientSecret,clients.name,scope,COUNT(*) AS tokens FROM tokens,clients WHERE tokens.clientId=clients.id AND userId=? GROUP BY tokens.clientId', [ userId ], function (error, results) { if (error) return callback(new DatabaseError(DatabaseError.INTERNAL_ERROR, error)); if (typeof results === 'undefined') results = []; diff --git a/webadmin/views/security.html b/webadmin/views/security.html index 9c0236b6d..7124ac268 100644 --- a/webadmin/views/security.html +++ b/webadmin/views/security.html @@ -10,14 +10,20 @@
-

- {{client.name}} +

+ {{client.name}}

+

Details

Permissions: {{ client.scope }}

Provided Tokens: {{ client.tokens }}

+
+

Credentials

+

Client ID: {{ client.clientId }}

+

Client Secret: {{ client.clientSecret }}

+