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
use async_trait;
use crate::;
/// EXAMPLE
/// ```
/// struct User {}
/// impl AuthUser for User {
/// fn get_id(&self) -> String {
/// todo!()
/// }
/// fn get_username(&self) -> String {
/// todo!()
/// }
/// fn is_admin(&self) -> bool {
/// todo!()
/// }
/// }
/// #[injectable(IAuthService)]
/// struct ExampleAuthService;
/// impl RustiumService for ExampleAuthService {}
/// #[async_trait]
/// impl IAuthService for ExampleAuthService {
/// async fn get_claim_user(&self, token_claim: Claims) -> RustiumResult<Box<dyn AuthUser>> {
/// todo!()
/// }
/// }
/// ```