1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! What can go wrong when issuing or presenting a remember-me token.
/// An error from the remember-me store.
///
/// Note what is *not* here: "wrong token", and -- more importantly -- "stolen
/// token". A cookie that does not sign anybody in is
/// [`RememberOutcome`](super::RememberOutcome), not an error, and that is a
/// deliberate split rather than a stylistic one.
///
/// The reason differs from the password-reset store's. There, the outcomes are
/// collapsed because telling them apart would be an enumeration oracle. Here
/// they are *not* collapsed -- the caller genuinely needs to know a theft from
/// an unknown cookie, because one of them means warning a user and ending
/// their other sessions. What they are is **not errors**: a browser presenting
/// a cookie from a laptop that was wiped last month is the system working, and
/// a `Result` that is `Err` on the ordinary path teaches every call site to
/// log-and-ignore the variant that matters.