mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-03 16:38:50 -04:00
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>
This commit is contained in:
parent
265195e305
commit
f68caab6e8
7 changed files with 149 additions and 93 deletions
|
@ -4,17 +4,19 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { IsNumber, IsString } from 'class-validator';
|
||||
import { IsDate, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
export class AuthTokenDto {
|
||||
@IsString()
|
||||
label: string;
|
||||
@IsString()
|
||||
keyId: string;
|
||||
@IsNumber()
|
||||
created: number;
|
||||
@IsNumber()
|
||||
validUntil: number | null;
|
||||
@IsNumber()
|
||||
lastUsed: number | null;
|
||||
@IsDate()
|
||||
createdAt: Date;
|
||||
@IsDate()
|
||||
@IsOptional()
|
||||
validUntil: Date;
|
||||
@IsDate()
|
||||
@IsOptional()
|
||||
lastUsed: Date;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue