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:
Philip Molares 2021-01-15 18:53:09 +01:00 committed by David Mehren
parent 4784a1aea2
commit 2ab950c5c3
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
11 changed files with 174 additions and 18 deletions

11
src/auth/auth.module.ts Normal file
View file

@ -0,0 +1,11 @@
import { Module } from '@nestjs/common';
import { AuthService } from './auth.service';
import { UsersModule } from '../users/users.module';
import { PassportModule } from '@nestjs/passport';
import { TokenStrategy } from './token.strategy';
@Module({
imports: [UsersModule, PassportModule],
providers: [AuthService, TokenStrategy],
})
export class AuthModule {}