mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-31 23:28:34 -04:00
auth: adds token-auth to public api
adds auth service adds auth module adds token-auth strategy adds token-auth to all public api calls Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
9a65a9bd29
commit
8d89614a4d
11 changed files with 174 additions and 18 deletions
11
src/auth/token-auth.guard.ts
Normal file
11
src/auth/token-auth.guard.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
|
||||
@Injectable()
|
||||
export class TokenAuthGuard extends AuthGuard('token') {}
|
Loading…
Add table
Add a link
Reference in a new issue