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 public Jwt type #164

Merged
merged 4 commits into from
Jun 12, 2020
Merged

Add public Jwt type #164

merged 4 commits into from
Jun 12, 2020

Conversation

giarc3
Copy link
Member

@giarc3 giarc3 commented Jun 11, 2020

Switched from frank_jwt to jsonwebtoken.

There already was an internal Jwt type, so re-purposed it and made it public. It validates that the jwt has the correct payload fields and an allowed algorithm. user_create, user_verify, and generate_new_device all use the new Jwt type instead of &str.

Also fixes:

src/internal/user_api.rs Outdated Show resolved Hide resolved
.github/workflows/ci.yaml Show resolved Hide resolved
src/internal/user_api.rs Outdated Show resolved Hide resolved
src/internal/user_api.rs Show resolved Hide resolved
@giarc3 giarc3 requested a review from clintfred June 12, 2020 20:26
Copy link
Contributor

@clintfred clintfred left a comment

Choose a reason for hiding this comment

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

Looks good.

Note that with this change this is the first time we are using Windows' native TLS implementation to talk to the web service.

@giarc3 giarc3 merged commit 318fd5e into master Jun 12, 2020
@giarc3 giarc3 deleted the 160-jwt-type branch June 12, 2020 20:37
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.

3 participants