@@ -44,7 +44,7 @@ impl Options {
4444 r"The homeserver host in the config (`matrix.homeserver`) is not a valid domain.
4545See {DOCS_BASE}/setup/homeserver.html" ,
4646 ) ?;
47- let admin_token = config. matrix . secret ( ) . await ?;
47+ let secret = config. matrix . secret ( ) . await ?;
4848 let hs_api = config. matrix . endpoint ;
4949
5050 if !issuer. starts_with ( "https://" ) {
@@ -280,49 +280,50 @@ Error details: {e}
280280 ) ,
281281 }
282282
283- // Try to reach an authenticated admin API endpoint
283+ // Try to reach an authenticated MAS API endpoint
284284 let mas_api = hs_api. join ( "/_synapse/mas/is_localpart_available" ) ?;
285285 let result = http_client
286286 . get ( mas_api. as_str ( ) )
287- . bearer_auth ( & admin_token )
287+ . bearer_auth ( & secret )
288288 . send_traced ( )
289289 . await ;
290290 match result {
291291 Ok ( response) => {
292292 let status = response. status ( ) ;
293- // We intentionally omit the required 'localpart' parameter in this request.
294- // If authentication is successful, Synapse returns a 400 Bad Request because of
295- // the missing parameter. If authentication fails, Synapse
296- // will return a 403 Forbidden. If the MAS integration isn't
297- // enabled, Synapse will return a 404 Not found.
293+ // We intentionally omit the required 'localpart' parameter
294+ // in this request. If authentication is successful, Synapse
295+ // returns a 400 Bad Request because of the missing
296+ // parameter. If authentication fails, Synapse will return a
297+ // 403 Forbidden. If the MAS integration isn't enabled,
298+ // Synapse will return a 404 Not found.
298299 if status == StatusCode :: BAD_REQUEST {
299300 info ! (
300- r#"✅ The Synapse admin API is reachable with authentication at "{mas_api}"."#
301+ r#"✅ The Synapse MAS API is reachable with authentication at "{mas_api}"."#
301302 ) ;
302303 } else {
303304 error ! (
304- r#"❌ A Synapse admin API endpoint at "{mas_api}" replied with {status}.
305+ r#"❌ A Synapse MAS API endpoint at "{mas_api}" replied with {status}.
305306Make sure the homeserver is running, and that the MAS config has the correct `matrix.secret`.
306- It should match the `admin_token ` set in the Synapse config.
307+ It should match the `secret ` set in the Synapse config.
307308
308309 matrix_authentication_service:
309310 enabled: true
310311 endpoint: {issuer:?}
311312 # This must exactly match the secret in the MAS config:
312- secret: {admin_token :?}
313+ secret: {secret :?}
313314
314315And in the MAS config:
315316
316317 matrix:
317318 homeserver: "{matrix_domain}"
318319 endpoint: "{hs_api}"
319- secret: {admin_token :?}
320+ secret: {secret :?}
320321"#
321322 ) ;
322323 }
323324 }
324325 Err ( e) => error ! (
325- r#"❌ Can't reach the Synapse admin API at "{mas_api}".
326+ r#"❌ Can't reach the Synapse MAS API at "{mas_api}".
326327Make sure the homeserver is running, and that the MAS config has the correct `matrix.secret`.
327328
328329Error details: {e}
0 commit comments