@@ -24,7 +24,7 @@ use sqlx::{postgres::PgAdvisoryLock, Connection, PgConnection};
2424use tracing:: { error, info, info_span, warn} ;
2525
2626fn map_import_action (
27- config : & mas_config:: UpstreamOAuth2ImportAction ,
27+ config : mas_config:: UpstreamOAuth2ImportAction ,
2828) -> mas_data_model:: UpstreamOAuthProviderImportAction {
2929 match config {
3030 mas_config:: UpstreamOAuth2ImportAction :: Ignore => {
@@ -50,15 +50,15 @@ fn map_claims_imports(
5050 template : config. subject . template . clone ( ) ,
5151 } ,
5252 localpart : mas_data_model:: UpstreamOAuthProviderImportPreference {
53- action : map_import_action ( & config. localpart . action ) ,
53+ action : map_import_action ( config. localpart . action ) ,
5454 template : config. localpart . template . clone ( ) ,
5555 } ,
5656 displayname : mas_data_model:: UpstreamOAuthProviderImportPreference {
57- action : map_import_action ( & config. displayname . action ) ,
57+ action : map_import_action ( config. displayname . action ) ,
5858 template : config. displayname . template . clone ( ) ,
5959 } ,
6060 email : mas_data_model:: UpstreamOAuthProviderImportPreference {
61- action : map_import_action ( & config. email . action ) ,
61+ action : map_import_action ( config. email . action ) ,
6262 template : config. email . template . clone ( ) ,
6363 } ,
6464 verify_email : match config. email . set_email_verification {
@@ -145,11 +145,10 @@ pub async fn config_sync(
145145 }
146146
147147 let encrypted_client_secret = provider
148- . client_secret ( )
148+ . client_secret
149+ . as_deref ( )
149150 . map ( |client_secret| encrypter. encrypt_to_string ( client_secret. as_bytes ( ) ) )
150151 . transpose ( ) ?;
151- let token_endpoint_auth_method = provider. client_auth_method ( ) ;
152- let token_endpoint_signing_alg = provider. client_auth_signing_alg ( ) ;
153152
154153 let discovery_mode = match provider. discovery_mode {
155154 mas_config:: UpstreamOAuth2DiscoveryMode :: Oidc => {
@@ -198,8 +197,10 @@ pub async fn config_sync(
198197 human_name : provider. human_name ,
199198 brand_name : provider. brand_name ,
200199 scope : provider. scope . parse ( ) ?,
201- token_endpoint_auth_method,
202- token_endpoint_signing_alg,
200+ token_endpoint_auth_method : provider. token_endpoint_auth_method . into ( ) ,
201+ token_endpoint_signing_alg : provider
202+ . token_endpoint_auth_signing_alg
203+ . clone ( ) ,
203204 client_id : provider. client_id ,
204205 encrypted_client_secret,
205206 claims_imports : map_claims_imports ( & provider. claims_imports ) ,
0 commit comments