Implement constructors for ServerPadlockGenerator/UserServerKeyGenerator
This commit is contained in:
parent
d37c09d8d9
commit
c7ed275138
1 changed files with 10 additions and 4 deletions
14
src/auth.rs
14
src/auth.rs
|
@ -82,8 +82,8 @@ pub struct ServerPadlockGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ServerPadlockGenerator {
|
impl ServerPadlockGenerator {
|
||||||
pub fn new(/* secret */) -> Self {
|
pub fn new(secret: PadlockGenerationSecret) -> Self {
|
||||||
todo!()
|
Self { secret }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[instrument]
|
#[instrument]
|
||||||
|
@ -99,8 +99,14 @@ pub struct UserServerKeyGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl UserServerKeyGenerator {
|
impl UserServerKeyGenerator {
|
||||||
pub fn new(/* UserAuthenticator, ServerPadlockGenerator? */) -> Self {
|
pub fn new(
|
||||||
todo!()
|
user_authenticator: Arc<UserAuthenticator>,
|
||||||
|
padlock_generator: Arc<ServerPadlockGenerator>,
|
||||||
|
) -> Self {
|
||||||
|
Self {
|
||||||
|
user_authenticator,
|
||||||
|
padlock_generator,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[instrument]
|
#[instrument]
|
||||||
|
|
Loading…
Reference in a new issue