tokens: add ip restriction
This commit is contained in:
@@ -149,7 +149,7 @@ async function setup() {
|
||||
expect(response.status).to.equal(201);
|
||||
admin.id = response.body.id;
|
||||
// HACK to get a token for second user (passwords are generated and the user should have gotten a password setup link...)
|
||||
const token1 = await tokens.add({ identifier: admin.id, clientId: tokens.ID_WEBADMIN, expires: Date.now() + (60 * 60 * 1000), name: 'fromtest' });
|
||||
const token1 = await tokens.add({ identifier: admin.id, clientId: tokens.ID_WEBADMIN, expires: Date.now() + (60 * 60 * 1000), name: 'fromtest', allowedIpRanges: '' });
|
||||
admin.token = token1.accessToken;
|
||||
|
||||
// create user
|
||||
@@ -159,7 +159,7 @@ async function setup() {
|
||||
expect(response.status).to.equal(201);
|
||||
user.id = response.body.id;
|
||||
// HACK to get a token for second user (passwords are generated and the user should have gotten a password setup link...)
|
||||
const token2 = await tokens.add({ identifier: user.id, clientId: tokens.ID_WEBADMIN, expires: Date.now() + (60 * 60 * 1000), name: 'fromtest' });
|
||||
const token2 = await tokens.add({ identifier: user.id, clientId: tokens.ID_WEBADMIN, expires: Date.now() + (60 * 60 * 1000), name: 'fromtest', allowedIpRanges: '' });
|
||||
user.token = token2.accessToken;
|
||||
|
||||
// create app object
|
||||
|
||||
Reference in New Issue
Block a user