mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 17:25:16 -04:00
auth: Add cron to clean old tokens
Rename AuthToken.identifier to label Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
cc2fcac532
commit
0a3247492a
6 changed files with 27 additions and 17 deletions
|
@ -35,7 +35,7 @@ describe('AuthService', () => {
|
|||
accessTokenHash: '',
|
||||
createdAt: new Date(),
|
||||
id: 1,
|
||||
identifier: 'testIdentifier',
|
||||
label: 'testIdentifier',
|
||||
keyId: 'abc',
|
||||
lastUsed: null,
|
||||
user: null,
|
||||
|
@ -186,7 +186,7 @@ describe('AuthService', () => {
|
|||
const tokenDto = await service.toAuthTokenDto(authToken);
|
||||
expect(tokenDto.keyId).toEqual(authToken.keyId);
|
||||
expect(tokenDto.lastUsed).toBeNull();
|
||||
expect(tokenDto.label).toEqual(authToken.identifier);
|
||||
expect(tokenDto.label).toEqual(authToken.label);
|
||||
expect(tokenDto.validUntil).toBeNull();
|
||||
expect(tokenDto.createdAt.getTime()).toEqual(
|
||||
authToken.createdAt.getTime(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue