Page MenuHomePhabricator

[services][identity] PAKE login
ClosedPublic

Authored by varun on Jun 24 2022, 6:36 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 26, 4:49 AM
Unknown Object (File)
Tue, Oct 22, 2:07 AM
Unknown Object (File)
Mon, Oct 21, 2:20 AM
Unknown Object (File)
Sun, Oct 20, 1:45 PM
Unknown Object (File)
Fri, Oct 18, 6:09 PM
Unknown Object (File)
Thu, Oct 10, 1:44 AM
Unknown Object (File)
Thu, Oct 10, 1:44 AM
Unknown Object (File)
Thu, Oct 10, 1:44 AM

Details

Summary

Implementation of the login_user RPC. Most of the logic is in the subroutines for starting and finishing login.

We track the number of messages received to make sure the client is not misusing the stream.

Depends on D4351

Test Plan

Called login_user RPC, tested all failure paths and the success case

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Jun 24 2022, 6:42 AM
tomek requested changes to this revision.Jun 27 2022, 4:15 AM

The indentation here is quite extreme - could you find a way to reduce it? Restructure the code, create separate functions, etc.

services/identity/src/service.rs
87–88 ↗(On Diff #13818)

For me String::new() better describes the intention here

This revision now requires changes to proceed.Jun 27 2022, 4:15 AM
varun marked an inline comment as done.

Decrease indentation and change "".to_string() to String::new()

Looks a lot more readable - thanks!

services/identity/src/service.rs
93–96 ↗(On Diff #13853)

Nice!

122–142 ↗(On Diff #13853)

What do you think about moving most of this logic outside of the if condition?

This revision is now accepted and ready to land.Jun 28 2022, 6:44 AM
services/identity/src/service.rs
122–142 ↗(On Diff #13853)

I'm fine with this

services/identity/src/service.rs
122–142 ↗(On Diff #13853)

I should do this in a bunch of places so will do in a separate diff actually

This revision was automatically updated to reflect the committed changes.