chore: fix code traces
This commit is contained in:
parent
03215df72a
commit
595372593a
@ -67,7 +67,6 @@ pub async fn login_user (
|
|||||||
};
|
};
|
||||||
let (mut user_sel, mut openid_user) = if source == "from_login_openid" {
|
let (mut user_sel, mut openid_user) = if source == "from_login_openid" {
|
||||||
let user_data = auth_state.user_data();
|
let user_data = auth_state.user_data();
|
||||||
dbg!(&user_data);
|
|
||||||
let openid_conf = if let Some(openid_conf) = app_dbs.config.openid_auths.get(&user_data[0]) {
|
let openid_conf = if let Some(openid_conf) = app_dbs.config.openid_auths.get(&user_data[0]) {
|
||||||
openid_conf
|
openid_conf
|
||||||
} else {
|
} else {
|
||||||
@ -82,7 +81,6 @@ pub async fn login_user (
|
|||||||
println!("Error openid {}/{} select: {}", &openid_conf.signup_application, &user_login.name, e);
|
println!("Error openid {}/{} select: {}", &openid_conf.signup_application, &user_login.name, e);
|
||||||
OpenidUser::default()
|
OpenidUser::default()
|
||||||
});
|
});
|
||||||
dbg!(&openid_user);
|
|
||||||
if openid_user.name.is_empty() {
|
if openid_user.name.is_empty() {
|
||||||
let str_user_data = format!("openid|{}|{}|{}|{}|{}|", &user_data[0], &user_data[1], &user_data[2], &openid_conf.signup_application, &user_login.name);
|
let str_user_data = format!("openid|{}|{}|{}|{}|{}|", &user_data[0], &user_data[1], &user_data[2], &openid_conf.signup_application, &user_login.name);
|
||||||
let session_token = req_handler.new_token();
|
let session_token = req_handler.new_token();
|
||||||
|
@ -305,8 +305,6 @@ pub fn users_login_router_handlers() -> Router {
|
|||||||
) -> Response {
|
) -> Response {
|
||||||
SessionStoreDB::cleanup_data(&app_dbs).await;
|
SessionStoreDB::cleanup_data(&app_dbs).await;
|
||||||
let auth_state = get_auth_state(true, &cookies, &app_dbs).await;
|
let auth_state = get_auth_state(true, &cookies, &app_dbs).await;
|
||||||
dbg!(&header);
|
|
||||||
dbg!(&auth_state);
|
|
||||||
let mut req_handler = ReqHandler::new(
|
let mut req_handler = ReqHandler::new(
|
||||||
ReqHeaderMap::new(header, &format!("{}",&uri.path().to_string()), &app_connect_info),
|
ReqHeaderMap::new(header, &format!("{}",&uri.path().to_string()), &app_connect_info),
|
||||||
&app_dbs,
|
&app_dbs,
|
||||||
@ -449,8 +447,6 @@ pub fn users_login_router_handlers() -> Router {
|
|||||||
data: axum::extract::Query<OpenidData>,
|
data: axum::extract::Query<OpenidData>,
|
||||||
// Json(user_login): Json<UserLogin>,
|
// Json(user_login): Json<UserLogin>,
|
||||||
) -> Response {
|
) -> Response {
|
||||||
dbg!(&header);
|
|
||||||
dbg!(&uri);
|
|
||||||
let auth_state = get_auth_state(true, &cookies, &app_dbs).await;
|
let auth_state = get_auth_state(true, &cookies, &app_dbs).await;
|
||||||
let user_data = auth_state.user_data();
|
let user_data = auth_state.user_data();
|
||||||
//let _req_handler = ReqHandler::new(
|
//let _req_handler = ReqHandler::new(
|
||||||
|
@ -383,7 +383,6 @@ pub fn users_settings_router_handlers() -> Router {
|
|||||||
// "Error authorization"
|
// "Error authorization"
|
||||||
// ).into_response();
|
// ).into_response();
|
||||||
}
|
}
|
||||||
dbg!("{}",&user_item);
|
|
||||||
let result="";
|
let result="";
|
||||||
(
|
(
|
||||||
//status,
|
//status,
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
mod entries;
|
mod entries;
|
||||||
mod userdata;
|
mod userdata;
|
||||||
mod user;
|
mod user;
|
||||||
|
mod openid;
|
||||||
mod userstore;
|
mod userstore;
|
||||||
mod userstatus;
|
mod userstatus;
|
||||||
mod user_role;
|
mod user_role;
|
||||||
|
|
||||||
pub(crate) use user::User;
|
pub(crate) use user::User;
|
||||||
|
pub(crate) use openid::OpenidUser;
|
||||||
pub(crate) use userstore::UserStore;
|
pub(crate) use userstore::UserStore;
|
||||||
pub(crate) use userstatus::UserStatus;
|
pub(crate) use userstatus::UserStatus;
|
||||||
pub(crate) use userdata::{
|
pub(crate) use userdata::{
|
||||||
|
AllUserData,
|
||||||
UserData,
|
UserData,
|
||||||
UserLogin,
|
UserLogin,
|
||||||
UserItem,
|
UserItem,
|
||||||
|
@ -145,7 +145,6 @@ impl OpenidUser {
|
|||||||
match store {
|
match store {
|
||||||
UserStore::Sql(pool) => {
|
UserStore::Sql(pool) => {
|
||||||
let query_str = format!("SELECT * FROM {} WHERE '{}' = ?", OPENID_USERS_TABLENAME, field);
|
let query_str = format!("SELECT * FROM {} WHERE '{}' = ?", OPENID_USERS_TABLENAME, field);
|
||||||
dbg!(&query_str);
|
|
||||||
let mut stream = sqlx::query(
|
let mut stream = sqlx::query(
|
||||||
&query_str
|
&query_str
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user