mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 10:15:17 -04:00
feat(knex): create database interfaces and knexjs nest integration
Co-authored-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
902abf72e6
commit
a9183e82bf
93 changed files with 760 additions and 2927 deletions
32
backend/src/database/identity.ts
Normal file
32
backend/src/database/identity.ts
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2025 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { ProviderType } from '../auth/provider-type.enum';
|
||||
|
||||
/**
|
||||
* An auth identity holds the information how a {@link User} can authenticate themself using a certain auth provider
|
||||
*/
|
||||
export interface Identity {
|
||||
/** The id of the user */
|
||||
userId: number;
|
||||
|
||||
/** The type of the auth provider */
|
||||
providerType: ProviderType;
|
||||
|
||||
/** The identifier of the auth provider, e.g. gitlab */
|
||||
providerIdentifier: string | null;
|
||||
|
||||
/** Timestamp when this identity was created */
|
||||
createdAt: Date;
|
||||
|
||||
/** Timestamp when this identity was last updated */
|
||||
updatedAt: Date;
|
||||
|
||||
/** The remote id of the user at the auth provider or null for local identities */
|
||||
providerUserId: string | null;
|
||||
|
||||
/** The hashed password for local identities or null for other auth providers */
|
||||
passwordHash: string | null;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue