diff --git a/webadmin/src/views/tokens.html b/webadmin/src/views/tokens.html index ee44f0a9b..34f2b9633 100644 --- a/webadmin/src/views/tokens.html +++ b/webadmin/src/views/tokens.html @@ -85,7 +85,35 @@
-

Application and API Access

+

API tokens

+
+
+ + +
+
+
+
+ Use those tokens are for working with https://cloudron.io/references/api.html.
+ They have the admin scope attached and will not expire. + They are issued explicitly for the user who creates them, so they will return that users profile. +
+
+

Active Tokens

+
+

+ {{ token.accessToken }} +

+
+
+
+
+ +
+ +
+
+

Application and other API Access

diff --git a/webadmin/src/views/tokens.js b/webadmin/src/views/tokens.js index 3d261fdb3..596cc4e96 100644 --- a/webadmin/src/views/tokens.js +++ b/webadmin/src/views/tokens.js @@ -5,6 +5,7 @@ angular.module('Application').controller('TokensController', ['$scope', 'Client' $scope.config = Client.getConfig(); $scope.activeClients = []; + $scope.apiClient = {}; $scope.tokenInUse = null; $scope.clientAdd = { @@ -146,6 +147,9 @@ angular.module('Application').controller('TokensController', ['$scope', 'Client' $scope.activeClients = activeClients; $scope.activeClients.forEach(refreshClientTokens); + + $scope.activeClients = activeClients.filter(function (c) { return c.id !== 'cid-sdk'; }); + $scope.apiClient = activeClients.filter(function (c) { return c.id === 'cid-sdk'; })[0]; }); }