You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
Database refactoring
This commit is contained in:
@ -28,6 +28,7 @@ tokio = "1.21.2"
|
||||
tower = { version = "0.4.13", features = ["util"] }
|
||||
tracing = "0.1.37"
|
||||
url = "2.3.1"
|
||||
ulid = { version = "1.0.0", features = ["serde"] }
|
||||
|
||||
mas-data-model = { path = "../data-model" }
|
||||
mas-http = { path = "../http", features = ["client"] }
|
||||
|
@ -23,9 +23,11 @@ pub struct FancyError {
|
||||
context: ErrorContext,
|
||||
}
|
||||
|
||||
impl<E: std::fmt::Display> From<E> for FancyError {
|
||||
impl<E: std::fmt::Debug + std::fmt::Display> From<E> for FancyError {
|
||||
fn from(err: E) -> Self {
|
||||
let context = ErrorContext::new().with_description(err.to_string());
|
||||
let context = ErrorContext::new()
|
||||
.with_description(format!("{err}"))
|
||||
.with_details(format!("{err:?}"));
|
||||
FancyError { context }
|
||||
}
|
||||
}
|
||||
|
@ -20,13 +20,14 @@ use mas_storage::{
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sqlx::{Executor, Postgres};
|
||||
use ulid::Ulid;
|
||||
|
||||
use crate::CookieExt;
|
||||
|
||||
/// An encrypted cookie to save the session ID
|
||||
#[derive(Serialize, Deserialize, Debug, Default)]
|
||||
pub struct SessionInfo {
|
||||
current: Option<i64>,
|
||||
current: Option<Ulid>,
|
||||
}
|
||||
|
||||
impl SessionInfo {
|
||||
|
Reference in New Issue
Block a user