File tree Expand file tree Collapse file tree 5 files changed +18
-9
lines changed
Expand file tree Collapse file tree 5 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,9 @@ async function generateTableSasSample() {
8181 } ;
8282
8383 // Create the table SAS token
84+ const anHourFromNow = Date . now ( ) + 60 * 60 * 1000 ;
8485 const tableSas = generateTableSas ( tableName , cred , {
85- expiresOn : new Date ( "2021-12-12" ) ,
86+ expiresOn : new Date ( anHourFromNow ) ,
8687 permissions : tablePermissions ,
8788 } ) ;
8889
Original file line number Diff line number Diff line change @@ -45,10 +45,12 @@ async function generateTableSasSample() {
4545 delete : true
4646 } ;
4747
48+ const anHourFromNow = Date . now ( ) + 60 * 60 * 1000 ;
49+
4850 // Generate an account SAS with the NamedKeyCredential and the permissions set previously
4951 const accountSas = generateAccountSas ( cred , {
5052 permissions,
51- expiresOn : new Date ( "2021-12-12" )
53+ expiresOn : new Date ( anHourFromNow )
5254 } ) ;
5355
5456 const tableService = new TableServiceClient ( tablesUrl , new AzureSASCredential ( accountSas ) ) ;
@@ -78,7 +80,7 @@ async function generateTableSasSample() {
7880
7981 // Create the table SAS token
8082 const tableSas = generateTableSas ( tableName , cred , {
81- expiresOn : new Date ( "2021-12-12" ) ,
83+ expiresOn : new Date ( anHourFromNow ) ,
8284 permissions : tablePermissions
8385 } ) ;
8486
Original file line number Diff line number Diff line change @@ -47,10 +47,12 @@ async function generateTableSasSample() {
4747 delete : true
4848 } ;
4949
50+ const anHourFromNow = Date . now ( ) + 60 * 60 * 1000 ;
51+
5052 // Generate an account SAS with the NamedKeyCredential and the permissions set previously
5153 const accountSas = generateAccountSas ( cred , {
5254 permissions,
53- expiresOn : new Date ( "2021-12-12" )
55+ expiresOn : new Date ( anHourFromNow )
5456 } ) ;
5557
5658 const tableService = new TableServiceClient ( tablesUrl , new AzureSASCredential ( accountSas ) ) ;
@@ -80,7 +82,7 @@ async function generateTableSasSample() {
8082
8183 // Create the table SAS token
8284 const tableSas = generateTableSas ( tableName , cred , {
83- expiresOn : new Date ( "2021-12-12" ) ,
85+ expiresOn : new Date ( anHourFromNow ) ,
8486 permissions : tablePermissions
8587 } ) ;
8688
Original file line number Diff line number Diff line change @@ -45,10 +45,12 @@ async function generateTableSasSample() {
4545 delete : true
4646 } ;
4747
48+ const anHourFromNow = Date . now ( ) + 60 * 60 * 1000 ;
49+
4850 // Generate an account SAS with the NamedKeyCredential and the permissions set previously
4951 const accountSas = generateAccountSas ( cred , {
5052 permissions,
51- expiresOn : new Date ( "2021-12-12" )
53+ expiresOn : new Date ( anHourFromNow )
5254 } ) ;
5355
5456 const tableService = new TableServiceClient ( tablesUrl , new AzureSASCredential ( accountSas ) ) ;
@@ -78,7 +80,7 @@ async function generateTableSasSample() {
7880
7981 // Create the table SAS token
8082 const tableSas = generateTableSas ( tableName , cred , {
81- expiresOn : new Date ( "2021-12-12" ) ,
83+ expiresOn : new Date ( anHourFromNow ) ,
8284 permissions : tablePermissions
8385 } ) ;
8486
Original file line number Diff line number Diff line change @@ -47,10 +47,12 @@ async function generateTableSasSample() {
4747 delete : true
4848 } ;
4949
50+ const anHourFromNow = Date . now ( ) + 60 * 60 * 1000 ;
51+
5052 // Generate an account SAS with the NamedKeyCredential and the permissions set previously
5153 const accountSas = generateAccountSas ( cred , {
5254 permissions,
53- expiresOn : new Date ( "2021-12-12" )
55+ expiresOn : new Date ( anHourFromNow )
5456 } ) ;
5557
5658 const tableService = new TableServiceClient ( tablesUrl , new AzureSASCredential ( accountSas ) ) ;
@@ -80,7 +82,7 @@ async function generateTableSasSample() {
8082
8183 // Create the table SAS token
8284 const tableSas = generateTableSas ( tableName , cred , {
83- expiresOn : new Date ( "2021-12-12" ) ,
85+ expiresOn : new Date ( anHourFromNow ) ,
8486 permissions : tablePermissions
8587 } ) ;
8688
You can’t perform that action at this time.
0 commit comments