Compare commits
8 Commits
feature/10
...
feature/3-
| Author | SHA1 | Date | |
|---|---|---|---|
| b07b63add2 | |||
| f62c8a0c13 | |||
| 0cfb2edd83 | |||
| 0cef71e053 | |||
| db96953443 | |||
| a0a3a83cae | |||
| dbe79d5e1b | |||
| cf1da606d4 |
@@ -15,11 +15,8 @@ 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 && !token) {
|
||||
if (isPublic) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export interface TableOptions {
|
||||
connectionString;
|
||||
accountName: string;
|
||||
accountKey: string;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { TableOptions } from './az-table.interface';
|
||||
import { TABLE_OPTIONS } from './az-table.constants';
|
||||
import { TableClient } from '@azure/data-tables';
|
||||
import { TableClient, AzureNamedKeyCredential } from '@azure/data-tables';
|
||||
|
||||
@Injectable()
|
||||
export class TableService {
|
||||
@@ -11,7 +11,8 @@ export class TableService {
|
||||
) {}
|
||||
|
||||
async getTableClient(tableName: string): Promise<TableClient> {
|
||||
const tableClient: TableClient = new TableClient(this.tablesOptions.connectionString, tableName);
|
||||
const credential: AzureNamedKeyCredential = new AzureNamedKeyCredential(this.tablesOptions.accountName, this.tablesOptions.accountKey);
|
||||
const tableClient: TableClient = new TableClient(`https://${this.tablesOptions.accountName}.table.core.windows.net`, tableName, credential);
|
||||
|
||||
return tableClient;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@noahspan/noahspan-modules",
|
||||
"version": "0.4.0",
|
||||
"version": "0.3.9",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"license": "UNLICENSED",
|
||||
|
||||
Reference in New Issue
Block a user