auth: Add tests for AuthService

Move AuthTokens to auth folder

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-01-22 15:29:10 +01:00
parent 599fe57ec6
commit 84ec528d14
30 changed files with 329 additions and 186 deletions

View file

@ -0,0 +1,20 @@
/*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { IsNumber, IsString } from 'class-validator';
export class AuthTokenDto {
@IsString()
label: string;
@IsString()
keyId: string;
@IsNumber()
created: number;
@IsNumber()
validUntil: number | null;
@IsNumber()
lastUsed: number | null;
}