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
Add a soft-deletion column on upstream OAuth 2.0 providers
This commit is contained in:
@@ -141,10 +141,19 @@ pub struct UpstreamOAuthProvider {
|
||||
pub token_endpoint_signing_alg: Option<JsonWebSignatureAlg>,
|
||||
pub token_endpoint_auth_method: OAuthClientAuthenticationMethod,
|
||||
pub created_at: DateTime<Utc>,
|
||||
pub disabled_at: Option<DateTime<Utc>>,
|
||||
pub claims_imports: ClaimsImports,
|
||||
pub additional_authorization_parameters: Vec<(String, String)>,
|
||||
}
|
||||
|
||||
impl UpstreamOAuthProvider {
|
||||
/// Returns `true` if the provider is enabled
|
||||
#[must_use]
|
||||
pub const fn enabled(&self) -> bool {
|
||||
self.disabled_at.is_none()
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether to set the email as verified when importing it from the upstream
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, Default)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
|
Reference in New Issue
Block a user