mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-07-03 22:45:01 +00:00
Can authenticate admin with reset token
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
//!
|
||||
//! @author Pierre Hubert
|
||||
|
||||
#[derive(Copy, Clone, Eq, PartialEq)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Debug, Hash)]
|
||||
pub struct AdminID(u64);
|
||||
|
||||
impl AdminID {
|
||||
@ -38,4 +38,14 @@ pub struct AdminKey {
|
||||
pub admin_id: AdminID,
|
||||
pub name: String,
|
||||
pub key: String,
|
||||
}
|
||||
|
||||
/// Admin access token
|
||||
///
|
||||
/// Used to store authentication of an admin
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct AdminAccessToken {
|
||||
pub token: String,
|
||||
pub id: AdminID,
|
||||
pub last_refresh: u64
|
||||
}
|
Reference in New Issue
Block a user