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
4 changed files with 7 additions and 3 deletions

View File

@@ -15,8 +15,11 @@ export class AuthGuard extends PassportAuthGuard('azure-ad') implements CanActiv
'isPublic',
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;
}

View File

@@ -13,7 +13,7 @@ export class TableModule {
provide: TABLE_OPTIONS,
useValue: options
},
TableModule
TableService
],
exports: [TableService]
}

View File

@@ -7,6 +7,7 @@ export * from './azAppConfig/az-app-config.service';
export * from './azTable/az-table.module';
export * from './azTable/az-table.service';
export { TableClient } from '@azure/data-tables';
// Auth

View File

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