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

Prefix all crates with oj_ and use release version of dependencies

This commit is contained in:
NG (Graham)
2025-06-03 21:09:03 -04:00
parent d0c2b1ec03
commit f678426e10
85 changed files with 773 additions and 763 deletions

View File

@@ -1,5 +1,5 @@
[package]
name = "rc_services"
name = "oj_rc_services"
version.workspace = true
edition.workspace = true
readme.workspace = true
@@ -13,5 +13,5 @@ env_logger.workspace = true
tokio = { version = "1.43", features = [ "net", "macros", "rt-multi-thread", "io-util" ] }
clap.workspace = true
polariton.workspace = true
polariton_auth = { version = "*", path = "../polariton_auth" }
oj_polariton_auth = { version = "*", path = "../polariton_auth" }
polariton_server.workspace = true

View File

@@ -1,7 +1,7 @@
#![forbid(unsafe_code)]
mod cli;
use polariton_auth::Handshake;
use oj_polariton_auth::Handshake;
use tokio::net;
use polariton::packet::{Data, Message, Packet, StandardMessage};
@@ -85,7 +85,7 @@ impl AuthError {
}
}
impl polariton_auth::AuthProvider<AuthError> for AuthImpl {
impl oj_polariton_auth::AuthProvider<AuthError> for AuthImpl {
fn validate(&mut self, params: &std::collections::HashMap<u8, Typed>) -> Result<std::collections::HashMap<u8, Typed>, AuthError> {
if let Some(Typed::Str(token)) = params.get(&TOKEN_KEY) {
if let Some(Typed::Str(service)) = params.get(&SERVICE_KEY) {
@@ -190,7 +190,7 @@ async fn do_connect_handshake(
let to_send = match handshake.authenticate(&packet3, &ctx) {
Ok(x) => x,
Err(h) => match h.extra {
polariton_auth::AuthError::Validation(e) => {
oj_polariton_auth::AuthError::Validation(e) => {
e.log_err();
return None;
},