feat(server): UserAgent auth flow implemented

This commit is contained in:
hdbg
2026-02-14 13:02:33 +01:00
parent ffa60c90b1
commit 069a997691
12 changed files with 239 additions and 98 deletions

View File

@@ -9,12 +9,13 @@ tonic.workspace = true
prost.workspace = true
bytes = "1.11.1"
prost-derive = "0.14.3"
prost-types = { version = "0.14.3", features = ["chrono"] }
prost-types.workspace = true
tonic-prost = "0.14.3"
rkyv = "0.8.15"
tokio.workspace = true
futures.workspace = true
kameo.workspace = true
hex = "0.4.3"

View File

@@ -1,3 +1,5 @@
use crate::proto::auth::AuthChallenge;
pub mod proto {
tonic::include_proto!("arbiter");
@@ -22,3 +24,8 @@ pub fn home_path() -> Result<std::path::PathBuf, std::io::Error> {
Ok(arbiter_home)
}
pub fn format_challenge(challenge: &AuthChallenge) -> Vec<u8> {
let concat_form = format!("{}:{}", challenge.nonce, hex::encode(&challenge.pubkey));
concat_form.into_bytes().to_vec()
}