Add support for SRP as an alternative auth mechanism.#85
Add support for SRP as an alternative auth mechanism.#85
Conversation
kunalq
left a comment
There was a problem hiding this comment.
Minor comments (documentation related mostly), but looks good to me! This is cool!
| 9C256576 D674DF74 96EA81D3 383B4813 D692C6E0 E0D5D8E2 50B98BE4 | ||
| 8E495C1D 6089DAD1 5DC7D7B4 6154D6B6 CE8EF4AD 69B15D49 82559B29 | ||
| 7BCF1885 C529F566 660E57EC 68EDBC3C 05726CC0 2FD4CBF4 976EAA9A | ||
| FD5138FE 8376435B 9FC61D2F C0EB06E3 |
There was a problem hiding this comment.
Would these be better suited for a resource file? Or would that separate it too much from the code? (I'm guessing these are related to the multiplicative group generator?)
| val bytes = x.toByteArray | ||
| if (bytes.length >= 2 && bytes(0) == 0) bytes.tail else bytes | ||
| } | ||
| } |
| // We will use SRP if manager supports it, so we send a PING to get manager features. | ||
| val resp = Await.result(sendManagerRequest(2, "PING".toData), timeout) | ||
| val features: Set[String] = resp match { | ||
| case Cluster(_, Arr(features @ _*)) => Set(features.map(_.getString): _*) |
There was a problem hiding this comment.
I'd recommend using a different name for mapping the matched value in Arr(..) -- I probably get confused too easily, but seeing the name used twice in immediate parent-child scopes throws me off. It's also not immediately clear what the type of features is in the case body. It looks like it may be a Labrad type (an array?), and you're grabbing the elements as a Seq. For the sake of readability, could we expand this out a bit without sacrificing performance or functional-ness?
No description provided.