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
+4 -2
View File
@@ -23,7 +23,8 @@ describe('janitor', function () {
clientId: 'clientid-1',
expires: Number.MAX_SAFE_INTEGER,
lastUsedTime: null,
scope: { '*': 'rw' }
scope: { '*': 'rw' },
allowedIpRanges: '#this'
};
const token2 = {
name: 'token2',
@@ -31,7 +32,8 @@ describe('janitor', function () {
clientId: 'clientid-2',
expires: Date.now(),
lastUsedTime: null,
scope: null //{ '*': 'rw '}
scope: null, //{ '*': 'rw '}
allowedIpRanges: '1.2.3.5'
};
it('can cleanupTokens', async function () {