mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 09:51:11 +00:00
Refactor Global state into Context Files (#128)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import * as ViewModels from "../Contracts/ViewModels";
|
||||
import { CosmosClient } from "../Common/CosmosClient";
|
||||
import { userContext } from "../UserContext";
|
||||
|
||||
export class PortalTokenProvider implements ViewModels.TokenProvider {
|
||||
constructor() {}
|
||||
|
||||
public async getAuthHeader(): Promise<Headers> {
|
||||
const bearerToken = CosmosClient.authorizationToken();
|
||||
const bearerToken = userContext.authorizationToken;
|
||||
let fetchHeaders = new Headers();
|
||||
fetchHeaders.append("authorization", bearerToken);
|
||||
return fetchHeaders;
|
||||
|
||||
Reference in New Issue
Block a user