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

feat: User registration #185

Merged
merged 17 commits into from
Jul 27, 2020
Merged

feat: User registration #185

merged 17 commits into from
Jul 27, 2020

Conversation

AzureMarker
Copy link
Contributor

@AzureMarker AzureMarker commented Jul 15, 2020

Major changes:

  • Support registering users with routers. Currently only FCM is implemented (and webpush, but that should be happening via the connection servers).

Minor changes:

  • Read the payload via the Bytes/Json extractors to simplify code and to use their built-in size limiting functionality.
  • Return UUIDs as lowercase hyphenated strings (coincidentally the default Display impl for Uuid).

Closes #176

@AzureMarker AzureMarker added this to the Autoendpoint Rust Server milestone Jul 15, 2020
@AzureMarker AzureMarker linked an issue Jul 15, 2020 that may be closed by this pull request
@AzureMarker AzureMarker marked this pull request as ready for review July 17, 2020 19:07
autoendpoint/src/settings.rs Show resolved Hide resolved
let mut base = hex::decode(uaid.to_simple().to_string()).chain_err(|| "Error decoding")?;
base.extend(hex::decode(chid.to_simple().to_string()).chain_err(|| "Error decoding")?);

if let Some(k) = key {
Copy link
Member

Choose a reason for hiding this comment

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

So, part of me wonders if we should create a NONCE key when there's none specified. This would ensure that the new URLs have a consistent length and be a little less subject to potential scrutiny.

Not saying we should do that here, but just thinking about it a bit more with the new system we're putting out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

v2 endpoints require VAPID, at minimum to validate the public key hash in the endpoint URL. This would require changes to the clients who don't currently provide a key, because they probably also don't send VAPID.

Copy link
Member

Choose a reason for hiding this comment

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

Right, but we'd use the nonce for v1 endpoints that don't include the key. That shouldn't require any modification of the client.

jrconlin
jrconlin previously approved these changes Jul 21, 2020
@AzureMarker AzureMarker force-pushed the fix/actix-tokio-incompatibility branch from 4ed59b3 to a11591b Compare July 21, 2020 14:06
@AzureMarker AzureMarker force-pushed the fix/actix-tokio-incompatibility branch from a11591b to 89813f6 Compare July 21, 2020 14:37
Base automatically changed from fix/actix-tokio-incompatibility to master July 21, 2020 16:40
@AzureMarker AzureMarker dismissed jrconlin’s stale review July 21, 2020 16:40

The base branch was changed.

@AzureMarker AzureMarker merged commit 6df3e36 into master Jul 27, 2020
@AzureMarker AzureMarker deleted the feat/user-registration branch July 27, 2020 16:03
This was referenced Oct 16, 2020
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.

[autoendpoint] Support user registration endpoint
2 participants