1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-29 22:01:14 +03:00

CLI tool to sync the upstream IDPs with the config

This commit is contained in:
Quentin Gliech
2023-06-26 14:21:57 +02:00
parent 4f1b201c74
commit de13d3ef19
9 changed files with 377 additions and 23 deletions

View File

@ -48,7 +48,7 @@ pub use self::{
upstream_oauth2::{
UpstreamOAuthAuthorizationSession, UpstreamOAuthAuthorizationSessionState,
UpstreamOAuthLink, UpstreamOAuthProvider, UpstreamOAuthProviderClaimsImports,
UpstreamOAuthProviderImportPreference,
UpstreamOAuthProviderImportAction, UpstreamOAuthProviderImportPreference,
},
users::{
Authentication, BrowserSession, Password, User, UserEmail, UserEmailVerification,

View File

@ -75,14 +75,17 @@ pub enum ImportAction {
}
impl ImportAction {
#[must_use]
pub fn is_forced(&self) -> bool {
matches!(self, Self::Force | Self::Require)
}
#[must_use]
pub fn ignore(&self) -> bool {
matches!(self, Self::Ignore)
}
#[must_use]
pub fn is_required(&self) -> bool {
matches!(self, Self::Require)
}