1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Implement federated login; #123

This commit is contained in:
NG (Graham)
2026-07-05 15:45:36 -04:00
committed by NGnius
parent 6601c188d0
commit 2adf8249bb
35 changed files with 1466 additions and 121 deletions

View File

@@ -1,6 +1,7 @@
#![forbid(unsafe_code)]
mod cli;
mod robocraft;
mod oauth;
use actix_web::{App, HttpServer, Responder};
@@ -56,7 +57,7 @@ async fn main() -> std::io::Result<()> {
App::new()
.wrap_fn(|req, srv| {
use actix_web::dev::Service;
log::trace!("Request {} {}", req.method(), req.path());
log::debug!("Request {} {}", req.method(), req.path());
srv.call(req)
})
.app_data(cli_args2.clone())
@@ -73,12 +74,18 @@ async fn main() -> std::io::Result<()> {
.service(robocraft::email::email_password_auth)
.service(robocraft::steam::steam_auth)
.service(robocraft::username::user_password_auth)
.service(robocraft::displayname::displaye_password_auth)
.service(robocraft::intercom::services_ws)
.service(robocraft::intercom::service_msg)
.service(robocraft::intercom::lobby_state_ws)
.service(robocraft::intercom::lobby_state_msg)
.service(robocraft::intercom::status_get)
.service(robocraft::intercom::status_set)
.service(oauth::openid_config::get_openid_configuration)
.service(oauth::jwks::get_oauth_jwks)
.service(oauth::auth::post_oauth_auth)
.service(oauth::auth::get_oauth_auth)
.service(oauth::token::post_oauth_token)
})
.bind((cli_args.ip, cli_args.port))?
.run()