Get token name as input

This commit is contained in:
Girish Ramakrishnan
2018-08-27 16:04:16 -07:00
parent 764e7e7d1f
commit 9c90a20b4d
4 changed files with 60 additions and 20 deletions
+3 -2
View File
@@ -854,10 +854,11 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N
}).error(defaultErrorHandler(callback));
};
Client.prototype.createTokenByClientId = function (id, scope, expiresAt, callback) {
Client.prototype.createTokenByClientId = function (id, scope, expiresAt, name, callback) {
var data = {
scope: scope,
expiresAt: expiresAt
expiresAt: expiresAt,
name: name || ''
};
post('/api/v1/clients/' + id + '/tokens', data).success(function(data, status) {
if (status !== 201) return callback(new ClientError(status, data));