hedgedoc/src/auth/auth-token.dto.ts
Philip Molares f68caab6e8 auth: Integrate suggestions by @davidmehren
Add number type alias TimestampMillis
Remove solved ToDos
Change AuthToken and AuthTokenDto to use Date
Rename authService unit tests

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-25 21:30:02 +01:00

22 lines
410 B
TypeScript

/*
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { IsDate, IsOptional, IsString } from 'class-validator';
export class AuthTokenDto {
@IsString()
label: string;
@IsString()
keyId: string;
@IsDate()
createdAt: Date;
@IsDate()
@IsOptional()
validUntil: Date;
@IsDate()
@IsOptional()
lastUsed: Date;
}