Page MenuHomePhabricator

[keyserver] accountOwnershipResponder
ClosedPublic

Authored by varun on Jun 30 2023, 10:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 5:32 AM
Unknown Object (File)
Sun, Nov 3, 5:27 AM
Unknown Object (File)
Thu, Oct 31, 12:38 PM
Unknown Object (File)
Thu, Oct 31, 12:37 PM
Unknown Object (File)
Oct 1 2024, 3:00 PM
Unknown Object (File)
Oct 1 2024, 3:00 PM
Unknown Object (File)
Oct 1 2024, 3:00 PM
Unknown Object (File)
Oct 1 2024, 3:00 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
Branch
reserve-usernames (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

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.