3 Commits

Author SHA1 Message Date
adfbd5f8a3 adding optional auth to guard 2024-09-24 08:48:10 -05:00
72683c9ae2 adding optional auth to guard 2024-09-24 08:47:52 -05:00
fcffd65d33 Feature/3 add az table module (#7)
* adding azure table client module

* adding azure table client module

* adding azure table client module

* adding azure table client module

* adding azure table client module
2024-08-11 19:51:23 -05:00
2 changed files with 5 additions and 2 deletions

View File

@@ -15,8 +15,11 @@ export class AuthGuard extends PassportAuthGuard('azure-ad') implements CanActiv
'isPublic', 'isPublic',
context.getHandler() context.getHandler()
); );
const req = context.switchToHttp().getRequest();
const authHeader = req.headers.authorization;
const token = authHeader && authHeader.split(' ')[1];
if (isPublic) { if (isPublic && !token) {
return true; return true;
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@noahspan/noahspan-modules", "name": "@noahspan/noahspan-modules",
"version": "0.3.9", "version": "0.4.0",
"description": "", "description": "",
"author": "", "author": "",
"license": "UNLICENSED", "license": "UNLICENSED",