1
0
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:
2021-05-11 16:52:57 +02:00
parent 25830fe6d1
commit d8ec093786
9 changed files with 146 additions and 6 deletions

View File

@ -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
}