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

Replace generateApiKey with generateProvisioningKey #410

Merged
merged 2 commits into from Oct 4, 2017

Conversation

pimterry
Copy link
Contributor

@pimterry pimterry commented Oct 2, 2017

This is already deprecated in the API, and we really shouldn't be using or exposing it here. This replaces it with provisioning keys, which are the modern alternative.

This is another fun breaking change, so another inclusion for big lovely v7.

Copy link
Member

@thgreasi thgreasi left a comment

Choose a reason for hiding this comment

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

Other that the typo, LGTM

resin.models.application.getApiKey(@application.app_name).then (apiKey) ->
m.chai.expect(_.isString(apiKey)).to.be.true
m.chai.expect(apiKey).to.have.length(32)
it 'should be able to generate an provisioning key by name', ->
Copy link
Member

Choose a reason for hiding this comment

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

Is "a provisioning key" better?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Damn, good spot. Fixed.

…ateProvisioningKey

We now no longer allow generating app wide keys. Generate a provisioning
key to register new devices, and look at JWTs or user API keys (coming
soon) for other uses.

Change-Type: major
@pimterry
Copy link
Contributor Author

pimterry commented Oct 3, 2017

I'm going to wait for @Page- to confirm before I merge this, just because I'm not confident my understanding of the provisioning key work is totally correct.

@pimterry pimterry merged commit 8e2028e into v7 Oct 4, 2017
@pimterry pimterry deleted the remove-generate-api-key branch October 4, 2017 06:53
pimterry added a commit that referenced this pull request Oct 11, 2017
Replace generateApiKey with generateProvisioningKey
pimterry added a commit that referenced this pull request Oct 12, 2017
Replace generateApiKey with generateProvisioningKey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants