tokens: add ip restriction

This commit is contained in:
Girish Ramakrishnan
2025-03-07 11:53:03 +01:00
parent 2b0fd17fbf
commit 5342dae5b3
21 changed files with 177 additions and 44 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ describe('Profile API', function () {
});
it('fails with expired token', async function () {
const token = await tokens.add({ identifier: '0', clientId: 'clientid-0', expires: Date.now() - 2000 });
const token = await tokens.add({ identifier: '0', clientId: 'clientid-0', expires: Date.now() - 2000, allowedIpRanges: '' });
expect(token.accessToken).to.be.a('string');
const response = await superagent.get(`${serverUrl}/api/v1/profile`)