zax
zax copied to clipboard
Should the same client_token request return the same relay_token?
According to the specification(part 3.1, "Alice initiates session),
The same client_token requests should return the same relay_token
until the handshake attempt expires(1m)
For now, it does not seem to be the case. I have created a spec for that. It fails like so:
1) Alice initiates session /start_session responds with the same relay_token to the same client_token until the handshake attempt expires(1m)
Failure/Error: expect(first_body).to eq second_body
expected: "ZfR0K2wBuGZDY6dqXA/DgqEMQzi1WKAml9Cft8lnGO8=\r\n0"
got: "8Q6DrJt87CAXbRp/6T75qFOSWBu2xPUf0iuNR+dpz+I=\r\n0"
(compared using ==)
Diff:
@@ -1,3 +1,3 @@
-ZfR0K2wBuGZDY6dqXA/DgqEMQzi1WKAml9Cft8lnGO8=
+8Q6DrJt87CAXbRp/6T75qFOSWBu2xPUf0iuNR+dpz+I=
0
It looks like currently a new relay token is created every time, disregarding the handshake attempt expiration.
I think we should either
- Remove the note from the specification.
- Make the reference implementation adhere to the specification.