Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Update SAS expiry DateTime creation #307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vdiddlodka
Copy link

Created new method to produce properly formatted expiry DateTime strings. Azure did not accept standard PHP generated ISO 8601 datetime with DateTime::ATOM as suggested in PHP docs. Instead had to produce the datetime string in Zulu. Also updated documentation around implementation of generateBlobServiceSharedAccessSignatureToken method.

@ghost
Copy link

ghost commented Aug 26, 2021

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

❌ vdiddlodka sign now
You have signed the CLA already but the status is still pending? Let us recheck it.

@spaze
Copy link
Contributor

spaze commented Aug 26, 2021

@vdiddlodka Try the DateTime format used in #294 when using non-UTC timestamps.

@vdiddlodka
Copy link
Author

I'm receiving an error when trying to sign CLA, "Error
There is no CLA to sign for Azure/azure-storage-php

({"message":"Bad credentials","documentation_url":"https://docs.github.com/rest"})"

@vdiddlodka
Copy link
Author

vdiddlodka commented Aug 26, 2021

@vdiddlodka Try the DateTime format used in #294 when using non-UTC timestamps.

Edit 'p' was introduced in PHP 8.0 but 'P' should be available in PHP 7.

I thought 'P' in format was introduced in PHP 8 which would increase the minimum PHP version requirements. I could be wrong on that however.

@spaze
Copy link
Contributor

spaze commented Aug 26, 2021

@vdiddlodka Try the DateTime format used in #294 when using non-UTC timestamps.

I thought 'P' in format was introduced in PHP 8 which would increase the minimum PHP version requirements. I could be wrong on that however.

Lowercase p was indeed added in PHP 8 (see changelog) but I'm using uppercase P in the change. Uppercase P works since the DateTime class was added to PHP (at least since 5.2). This SDK targets PHP 5.6 and newer.

@vdiddlodka
Copy link
Author

For reference, I found this link detailing the accepted datetime format by the API; https://docs.microsoft.com/en-us/rest/api/storageservices/formatting-datetime-values

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants