tokens: Add token creation

Fix token deletion
Update plantuml docs
Add token validUntil and lastUsed fields

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-01-21 19:37:43 +01:00 committed by David Mehren
parent b84d0f7cab
commit 39d9fb5dec
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
2 changed files with 20 additions and 5 deletions

View file

@ -48,11 +48,8 @@ export class AuthToken {
identifier: string,
keyId: string,
accessToken: string,
validUntil?: Date,
): Pick<
AuthToken,
'user' | 'label' | 'keyId' | 'accessTokenHash' | 'createdAt' | 'validUntil'
> {
validUntil: Date,
): Pick<AuthToken, 'user' | 'accessToken'> {
const newToken = new AuthToken();
newToken.user = user;
newToken.label = identifier;