Refactor dependencies to reduce code base size (#111)
All checks were successful
continuous-integration/drone/push Build is passing

Use crates to reduce code base size :

* `actix-remote-ip` to safely determine user IP location
* `light-openid` for the OpenID primitives & as client to handle federation

Reviewed-on: #111
This commit is contained in:
2023-04-29 11:11:24 +00:00
parent f262e6f183
commit 6cc9f4c54c
18 changed files with 112 additions and 525 deletions

View File

@ -3,6 +3,7 @@ use std::sync::Arc;
use actix_web::web;
use bincode::{Decode, Encode};
use light_openid::crypto_wrapper::CryptoWrapper;
use uuid::Uuid;
use webauthn_rs::prelude::{
CreationChallengeResponse, Passkey, PublicKeyCredential, RegisterPublicKeyCredential,
@ -14,7 +15,6 @@ use crate::constants::{
APP_NAME, WEBAUTHN_LOGIN_CHALLENGE_EXPIRE, WEBAUTHN_REGISTER_CHALLENGE_EXPIRE,
};
use crate::data::app_config::AppConfig;
use crate::data::crypto_wrapper::CryptoWrapper;
use crate::data::user::{User, UserID};
use crate::utils::err::Res;
use crate::utils::time::time;