Page MenuHomePhabricator

[services][identity] PAKE login
ClosedPublic

Authored by varun on Jun 24 2022, 6:36 AM.
Tags
None
Referenced Files
F3393186: D4352.diff
Sat, Nov 30, 12:15 PM
Unknown Object (File)
Fri, Nov 29, 11:00 AM
Unknown Object (File)
Wed, Nov 27, 6:50 PM
Unknown Object (File)
Wed, Nov 27, 6:46 PM
Unknown Object (File)
Wed, Nov 27, 6:38 PM
Unknown Object (File)
Wed, Nov 13, 2:08 AM
Unknown Object (File)
Wed, Nov 13, 2:08 AM
Unknown Object (File)
Wed, Nov 13, 2:08 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
No Lint Coverage
Unit
No Test Coverage

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

Nice!

122–142

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

I'm fine with this

services/identity/src/service.rs
122–142

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.