Skip to content

Commit

Permalink
[Communication]: Always use x-ms-date for Hmac (#15807)
Browse files Browse the repository at this point in the history
* Always use x-ms-date for Hmac

* Try to fix phone number tests

* Still another error in phone number tests

* Update phoneNumber session records

* Update phone numbers node sessions

* Manually fix node record sessions for phone numbers

* Update missed session files

Co-authored-by: JP Chen <jiach@microsoft.com>
  • Loading branch information
JianpingChen and JP Chen authored Jun 18, 2021
1 parent 1d0b3dd commit ddf4714
Show file tree
Hide file tree
Showing 37 changed files with 931 additions and 1,059 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class CommunicationAccessKeyCredentialPolicy extends BaseRequestPolicy {
const verb = webResource.method.toUpperCase();
const utcNow = new Date().toUTCString();
const contentHash = await shaHash(webResource.body || "");
const dateHeader = isNode ? "date" : "x-ms-date";
const dateHeader = "x-ms-date";
const signedHeaders = `${dateHeader};host;x-ms-content-sha256`;

const url = URLBuilder.parse(webResource.url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { TestCommunicationIdentityClient } from "./utils/testCommunicationIdenti
import { exchangeTeamsTokenHttpClient, getTokenHttpClient } from "./utils/mockHttpClients";

describe("CommunicationIdentityClient [Mocked]", () => {
const dateHeader = isNode ? "date" : "x-ms-date";
const dateHeader = "x-ms-date";
const user: CommunicationUserIdentifier = { communicationUserId: "ACS_ID" };

afterEach(() => {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ddf4714

Please sign in to comment.