move tokens.ID_ into oidcClients.ID_
This commit is contained in:
@@ -13,18 +13,10 @@ exports = module.exports = {
|
||||
listByUserId,
|
||||
getByAccessToken,
|
||||
|
||||
validateTokenType,
|
||||
|
||||
hasScope,
|
||||
|
||||
isIpAllowedSync,
|
||||
|
||||
// token client ids. we categorize them so we can have different restrictions based on the client
|
||||
ID_WEBADMIN: 'cid-webadmin', // dashboard
|
||||
ID_DEVELOPMENT: 'cid-development', // dashboard development
|
||||
ID_CLI: 'cid-cli', // cloudron cli
|
||||
ID_SDK: 'cid-sdk', // created by user via dashboard
|
||||
|
||||
SCOPES: ['*']//, 'apps', 'domains'],
|
||||
};
|
||||
|
||||
@@ -57,15 +49,6 @@ function validateTokenName(name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function validateTokenType(type) {
|
||||
assert.strictEqual(typeof type, 'string');
|
||||
|
||||
const types = [ exports.ID_WEBADMIN, exports.ID_SDK, exports.ID_DEVELOPMENT, exports.ID_CLI ];
|
||||
if (types.indexOf(type) === -1) return new BoxError(BoxError.BAD_FIELD, `type must be one of ${types.join(',')}`);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function validateScope(scope) {
|
||||
assert.strictEqual(typeof scope, 'object');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user