mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-30 22:31:04 +00:00
auth: hash auth token
Since the auth token will be stored in hashed form in the db, we need to hash each provided auth token in order to search in the db for them. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
80c7ae2fa9
commit
e04fcb9ee9
1 changed files with 2 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { User } from './user.entity';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
|
@ -19,8 +19,7 @@ export class AuthToken {
|
|||
@Column()
|
||||
identifier: string;
|
||||
|
||||
@Type(() => Date)
|
||||
@Column('text')
|
||||
@CreateDateColumn()
|
||||
createdAt: Date;
|
||||
|
||||
@Column()
|
||||
|
|
Loading…
Reference in a new issue