Add UserServerKey, ServerPadlock, ServerHash types
This commit is contained in:
parent
d195147f35
commit
34a7d57507
1 changed files with 20 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
use secrecy::SecretString;
|
||||
use serde::Deserialize;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct Password(pub SecretString);
|
||||
|
@ -16,3 +16,22 @@ impl From<String> for UserToken {
|
|||
Self(SecretString::new(value))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct UserServerKey(pub SecretString);
|
||||
impl From<String> for UserServerKey {
|
||||
fn from(value: String) -> Self {
|
||||
Self(SecretString::new(value))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct ServerPadlock(pub SecretString);
|
||||
impl From<String> for ServerPadlock {
|
||||
fn from(value: String) -> Self {
|
||||
Self(SecretString::new(value))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct ServerHash(pub Vec<u8>);
|
||||
|
|
Loading…
Reference in a new issue