You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-07 17:03:01 +03:00
Save the authentication method on each authorization
This will help us logging out of the upstream.
This commit is contained in:
@@ -51,7 +51,7 @@ pub use self::{
|
||||
UpstreamOAuthProviderImportAction, UpstreamOAuthProviderImportPreference,
|
||||
},
|
||||
users::{
|
||||
Authentication, BrowserSession, Password, User, UserEmail, UserEmailVerification,
|
||||
UserEmailVerificationState,
|
||||
Authentication, AuthenticationMethod, BrowserSession, Password, User, UserEmail,
|
||||
UserEmailVerification, UserEmailVerificationState,
|
||||
},
|
||||
};
|
||||
|
@@ -64,6 +64,14 @@ pub struct Password {
|
||||
pub struct Authentication {
|
||||
pub id: Ulid,
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub authentication_method: AuthenticationMethod,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
pub enum AuthenticationMethod {
|
||||
Password { user_password_id: Ulid },
|
||||
UpstreamOAuth2 { upstream_oauth2_session_id: Ulid },
|
||||
Unknown,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
|
Reference in New Issue
Block a user