-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ManagedIdentityTokenResponse's expires_in can now be accepted in ISO …
- Loading branch information
1 parent
4d21e80
commit aac9d4c
Showing
5 changed files
with
81 additions
and
30 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@azure-msal-node-acc592b5-e625-4c66-b90d-a05f69971c9a.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "ManagedIdentityTokenResponse's expires_in can now be accepted in ISO 8601 date format #7544", | ||
"packageName": "@azure/msal-node", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
/** | ||
* @internal | ||
* Checks if a given date string is in ISO 8601 format. | ||
* | ||
* @param dateString - The date string to be checked. | ||
* @returns boolean - Returns true if the date string is in ISO 8601 format, otherwise false. | ||
*/ | ||
export function isIso8601(dateString: number | string): boolean { | ||
if (typeof dateString !== "string") { | ||
return false; | ||
} | ||
|
||
const date = new Date(dateString); | ||
return !isNaN(date.getTime()) && date.toISOString() === dateString; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters