feat(nex-servers): add nex token get stub and start working on grpc server
This commit is contained in:
parent
37a3c60a7a
commit
02c46fca1d
10 changed files with 347 additions and 12 deletions
|
|
@ -6,3 +6,4 @@ pub mod email;
|
|||
pub mod oauth;
|
||||
mod pid_distribution;
|
||||
pub mod people;
|
||||
pub mod provider;
|
||||
|
|
|
|||
|
|
@ -117,8 +117,6 @@ pub async fn generate_token(pool: &State<Pool>, data: Form<TokenRequestData<'_>>
|
|||
|
||||
let access_token = TokenReturnData::new(user.pid, pool).await;
|
||||
|
||||
|
||||
|
||||
Ok(Xml(TokenRequestReturnData{
|
||||
access_token
|
||||
}))
|
||||
|
|
|
|||
20
src/nnid/provider.rs
Normal file
20
src/nnid/provider.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use std::net::Ipv4Addr;
|
||||
use std::str::FromStr;
|
||||
use rocket::get;
|
||||
use serde::Serialize;
|
||||
use crate::xml::Xml;
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(rename = "nex_token")]
|
||||
struct NexToken{
|
||||
host: Ipv4Addr,
|
||||
nex_password: String,
|
||||
pid: i32,
|
||||
port: u16,
|
||||
token: String
|
||||
}
|
||||
|
||||
#[get("/v1/api/provider/nex_token/@me?<game_server_id>")]
|
||||
pub async fn get_nex_token(game_server_id: String) -> Option<Xml<NexToken>>{
|
||||
None
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue