mirror of
https://github.com/nitnelave/lldap.git
synced 2023-04-12 14:25:13 +00:00
model: Inline the BindRequest in the backend
This commit is contained in:
parent
2aca9dbe62
commit
651adbe3c8
@ -5,12 +5,6 @@ use std::collections::HashSet;
|
||||
|
||||
pub mod opaque;
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct BindRequest {
|
||||
pub name: String,
|
||||
pub password: String,
|
||||
}
|
||||
|
||||
/// The messages for the 3-step OPAQUE login process.
|
||||
pub mod login {
|
||||
use super::*;
|
||||
|
@ -1,8 +1,18 @@
|
||||
use super::error::*;
|
||||
use async_trait::async_trait;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashSet;
|
||||
|
||||
pub use lldap_model::*;
|
||||
pub use lldap_model::{
|
||||
AddUserToGroupRequest, CreateGroupRequest, CreateUserRequest, DeleteUserRequest, Group,
|
||||
ListUsersRequest, RequestFilter, User, UserDetailsRequest,
|
||||
};
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct BindRequest {
|
||||
pub name: String,
|
||||
pub password: String,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
pub trait LoginHandler: Clone + Send {
|
||||
|
@ -1,9 +1,12 @@
|
||||
use super::{
|
||||
error::*, handler::LoginHandler, opaque_handler::*, sql_backend_handler::SqlBackendHandler,
|
||||
error::*,
|
||||
handler::{BindRequest, LoginHandler},
|
||||
opaque_handler::*,
|
||||
sql_backend_handler::SqlBackendHandler,
|
||||
sql_tables::*,
|
||||
};
|
||||
use async_trait::async_trait;
|
||||
use lldap_model::{opaque, BindRequest};
|
||||
use lldap_model::opaque;
|
||||
use log::*;
|
||||
use sea_query::{Expr, Iden, Query};
|
||||
use sqlx::Row;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::{
|
||||
domain::{
|
||||
error::DomainError,
|
||||
handler::{BackendHandler, LoginHandler},
|
||||
handler::{BackendHandler, BindRequest, LoginHandler},
|
||||
opaque_handler::OpaqueHandler,
|
||||
},
|
||||
infra::{
|
||||
@ -23,7 +23,7 @@ use futures::future::{ok, Ready};
|
||||
use futures_util::{FutureExt, TryFutureExt};
|
||||
use hmac::Hmac;
|
||||
use jwt::{SignWithKey, VerifyWithKey};
|
||||
use lldap_model::{login, registration, BindRequest, JWTClaims};
|
||||
use lldap_model::{login, registration, JWTClaims};
|
||||
use log::*;
|
||||
use sha2::Sha512;
|
||||
use std::collections::{hash_map::DefaultHasher, HashSet};
|
||||
|
Loading…
Reference in New Issue
Block a user