mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-26 19:53:59 -05: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
cbf6ac912a
commit
a4522d7230
1 changed files with 2 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* 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 { User } from './user.entity';
|
||||||
import { Type } from 'class-transformer';
|
import { Type } from 'class-transformer';
|
||||||
|
|
||||||
|
@ -19,8 +19,7 @@ export class AuthToken {
|
||||||
@Column()
|
@Column()
|
||||||
identifier: string;
|
identifier: string;
|
||||||
|
|
||||||
@Type(() => Date)
|
@CreateDateColumn()
|
||||||
@Column('text')
|
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
|
|
Loading…
Reference in a new issue