Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to generate a SAS Token for a device #551

Merged
merged 3 commits into from
May 12, 2016
Merged

Add an option to generate a SAS Token for a device #551

merged 3 commits into from
May 12, 2016

Conversation

tomconte
Copy link
Member

Hi there, I was looking for a way to generate a SAS Token from the command line the other day and couldn't find one, so I added a small option to the iothub-explorer tool.

@azurecla
Copy link

Hi @tomconte, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!


It looks like you're working at Microsoft (tconte). If you're full-time, we DON'T require a contribution license agreement.



If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@pierreca pierreca self-assigned this May 11, 2016
@pierreca
Copy link
Contributor

LGTM. The only thing I may suggest to change is units for the expiry argument. it should probably be more precise than hours. seconds? miliseconds? @damonbarry ?

@@ -395,6 +411,9 @@ function usage() {
' {grey}Sends a cloud-to-device message to the given device, optionally with acknowledgment of receipt{/grey}',
' {green}iothub-explorer{/green} {white}[<connection-string>] receive [--messages=n]{/white}',
' {grey}Receives feedback about the delivery of cloud-to-device messages; optionally exits after receiving {white}n{/white} messages.{/grey}',
' {green}iothub-explorer{/green} {white}[<connection-string>] sas-token <device-id> [expiry]{/white}',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend that this command have a --duration option that mimics the one for the 'login' command (in seconds, one hour default if option isn't specified)

@tomconte
Copy link
Member Author

Thanks for the review @damonbarry ! Just sent a couple more commits to implement your suggestions.

@damonbarry
Copy link
Member

Looks good. I'm pushing this through our gate right now...

@az-iot-builder-01 az-iot-builder-01 merged commit 246eafc into Azure:develop May 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants