add auth docs, add eslint import/order

This commit is contained in:
andres
2023-07-16 19:44:58 +02:00
parent 0f3e89900a
commit aa7ece41a9
74 changed files with 1152 additions and 164 deletions

View File

@@ -6,6 +6,7 @@ export class BaseAuthGuard implements CanActivate {
canActivate(context: ExecutionContext): boolean | Promise<boolean> | Observable<boolean> {
const request = context.switchToHttp().getRequest()
const exceptedAuthInput = 'Basic YWRtaW46cXdlcnR5'
if (!request.headers || !request.headers.authorization) {
throw new UnauthorizedException([{ message: 'No any auth headers' }])
} else {
@@ -17,6 +18,7 @@ export class BaseAuthGuard implements CanActivate {
])
}
}
return true
}
}