Adding token module (#5)
Release Tagging / release (push) Successful in 29s
Rust Build / Check (push) Successful in 37s
Rust Build / Test Suite (push) Successful in 29s
Rust Build / Rustfmt (push) Successful in 27s
Rust Build / Clippy (push) Successful in 31s
Rust Build / build (push) Successful in 28s
Release Tagging / release (push) Successful in 29s
Rust Build / Check (push) Successful in 37s
Rust Build / Test Suite (push) Successful in 29s
Rust Build / Rustfmt (push) Successful in 27s
Rust Build / Clippy (push) Successful in 31s
Rust Build / build (push) Successful in 28s
Reviewed-on: phoenix/textsender-models#5
This commit was merged in pull request #5.
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
pub mod config;
|
pub mod config;
|
||||||
pub mod contact;
|
pub mod contact;
|
||||||
|
pub mod token;
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
|
pub struct Claims {
|
||||||
|
pub user_id: uuid::Uuid,
|
||||||
|
pub role: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||||
|
pub struct LoginResult {
|
||||||
|
pub user_id: uuid::Uuid,
|
||||||
|
pub access_token: String,
|
||||||
|
pub token_type: String,
|
||||||
|
pub expires_in: i64,
|
||||||
|
pub issued_at: i64,
|
||||||
|
}
|
||||||
|
|
||||||
|
// Alias for LoginResult
|
||||||
|
pub type Login = LoginResult;
|
||||||
Reference in New Issue
Block a user