Start Auth Library

Auth will talk to pocketbase
This commit is contained in:
2024-06-29 21:45:05 -04:00
Unverified
parent 818bec067f
commit 58b38f3d2d
7 changed files with 91 additions and 2 deletions

22
auth/src/server.rs Normal file
View File

@@ -0,0 +1,22 @@
use std::net::SocketAddr;
use tarpc::context::Context;
use crate::types::RealmAuth;
#[derive(Clone)]
pub struct RealmAuthServer {
pub socket: SocketAddr,
}
impl RealmAuthServer {
pub fn new(socket: SocketAddr) -> RealmAuthServer {
RealmAuthServer {
socket,
}
}
}
impl RealmAuth for RealmAuthServer {
async fn test(self, context: Context, name: String) -> String {
format!("Hello {}", name)
}
}