Specify the expiration on the client. Currently this is 100 years.
I am not sure if this is the best approach, or if we should introduce a magic value instead.
This commit is contained in:
@@ -549,8 +549,8 @@ angular.module('Application').service('Client', ['$http', 'md5', 'Notification',
|
||||
}).error(defaultErrorHandler(callback));
|
||||
};
|
||||
|
||||
Client.prototype.createTokenByClientId = function (id, callback) {
|
||||
$http.post(client.apiOrigin + '/api/v1/oauth/clients/' + id + '/tokens').success(function(data, status) {
|
||||
Client.prototype.createTokenByClientId = function (id, expiresAt, callback) {
|
||||
$http.post(client.apiOrigin + '/api/v1/oauth/clients/' + id + '/tokens?expiresAt=' + expiresAt).success(function(data, status) {
|
||||
if (status !== 201) return callback(new ClientError(status, data));
|
||||
callback(null, data.token);
|
||||
}).error(defaultErrorHandler(callback));
|
||||
|
||||
Reference in New Issue
Block a user