Page MenuHomePhabricator

[keyserver] accountOwnershipResponder
ClosedPublic

Authored by varun on Jun 30 2023, 10:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 24, 4:49 PM
Unknown Object (File)
Mon, Jul 22, 2:04 AM
Unknown Object (File)
Wed, Jul 17, 8:26 PM
Unknown Object (File)
Thu, Jul 4, 11:14 PM
Unknown Object (File)
Thu, Jul 4, 8:45 PM
Unknown Object (File)
Thu, Jul 4, 8:45 PM
Unknown Object (File)
Thu, Jul 4, 8:45 PM
Unknown Object (File)
Sun, Jun 30, 6:58 PM
Subscribers

Details

Summary

new responder that checks viewer's username and provides a signed message
attesting that the user owns that particular username. this message can then be
presented to the identity service to allow registration of a reserved username.

Test Plan

called the responder from web and verified that the signature returned with my local keyserver's ed25519 public content key

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun held this revision as a draft.

improve readability a little

varun published this revision for review.Sep 12 2023, 9:08 AM
varun added a reviewer: ashoat.
varun edited the test plan for this revision. (Show Details)
ashoat requested changes to this revision.Sep 12 2023, 9:59 AM

Nice!! Some nonstandard stuff in this diff; requesting changes in the hopes that we can use the more standard mechanisms

lib/actions/user-actions.js
66 ↗(On Diff #30973)

I noticed you're missing action types here. If that's because you're not planning on using the standard dispatchActionPromise mechanism, I'd like to have some more context on that decision

73 ↗(On Diff #30973)

Instead of this Promise.race, you can specify a custom timeout by passing a third parameter to callServerEndpoint like this

82 ↗(On Diff #30973)

Why are you swallowing the error? I can't tell where you're going to use this, but the typical pattern is to pass the Promise to dispatchActionPromise, which will gracefully handle a promise rejection (exception) by dispatching a failed action

This revision now requires changes to proceed.Sep 12 2023, 9:59 AM
This revision is now accepted and ready to land.Sep 14 2023, 11:26 AM
This revision was automatically updated to reflect the committed changes.