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
67
68
69
70
71
72
73
74
75
76
//! Claims structures for authentication tokens.
//!
//! This module defines the data structures and traits used for representing the claims
//! embedded in authentication tokens, such as access and refresh tokens. These claims
//! are used to securely encode information about the user and token validity, and are
//! typically serialized/deserialized as part of JWTs (JSON Web Tokens).
use ;
/// Trait for all types of claims used in authentication tokens.
///
/// This trait provides a common interface for extracting the subject (typically the user ID)
/// and expiration timestamp from any claim structure.
/// Claims for access tokens.
///
/// Access tokens are short-lived tokens used to authenticate requests to protected resources.
/// This struct contains the standard fields required for access token validation and identification.
/// Claims for refresh tokens.
///
/// Refresh tokens are long-lived tokens used to obtain new access tokens after the original
/// access token expires. This struct contains the standard fields required for refresh token
/// validation and identification.