tokens: ID_CLI is never used

This commit is contained in:
Girish Ramakrishnan
2021-09-17 15:21:56 -07:00
parent 66a907ef48
commit 8c66ec5d18

View File

@@ -18,7 +18,6 @@ exports = module.exports = {
// token client ids. we categorize them so we can have different restrictions based on the client
ID_WEBADMIN: 'cid-webadmin', // dashboard
ID_SDK: 'cid-sdk', // created by user via dashboard
ID_CLI: 'cid-cli' // created via cli tool
};
const TOKENS_FIELDS = [ 'id', 'accessToken', 'identifier', 'clientId', 'scope', 'expires', 'name', 'lastUsedTime' ].join(',');
@@ -40,7 +39,7 @@ function validateTokenName(name) {
function validateTokenType(type) {
assert.strictEqual(typeof type, 'string');
const types = [ exports.ID_WEBADMIN, exports.ID_CLI, exports.ID_SDK ];
const types = [ exports.ID_WEBADMIN, exports.ID_SDK ];
if (types.indexOf(type) === -1) return BoxError(BoxError.BAD_FIELD, `type must be one of ${types.join(',')}`);
return null;