blob: 7236c63e31bf461030544723f281e4554b9950ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
This file is part of jellything (https://codeberg.org/metamuffin/jellything)
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2024 metamuffin <metamuffin.org>
*/
use chrono::{DateTime, Utc};
use jellycommon::user::{PermissionSet, User};
use serde::{Deserialize, Serialize};
pub mod guard;
pub mod token;
pub struct Session {
pub user: User,
}
pub struct AdminSession(pub Session);
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SessionData {
username: String,
expire: DateTime<Utc>,
permissions: PermissionSet,
}
|