You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
733 B
32 lines
733 B
//! Authentication
|
|
use super::*;
|
|
|
|
pub struct Sha256Hash(pub sha256::Sha256Hash);
|
|
type RsaSignature = rsa::Signature;
|
|
|
|
impl str::FromStr for Sha256Hash
|
|
{
|
|
type Err = ();
|
|
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
|
todo!() //read encoded base64(?)/hex into `Signature`
|
|
}
|
|
}
|
|
|
|
pub async fn auth_req(who: source::IpAddr, state: Arc<state::State>) -> Result<(), Infallible>
|
|
{
|
|
|
|
Ok(())
|
|
}
|
|
|
|
pub async fn auth_key(who: source::IpAddr, state: Arc<state::State>, req_id: uuid::Uuid, num: usize, body: Bytes) -> Result<(), Infallible>
|
|
{
|
|
|
|
Ok(())
|
|
}
|
|
|
|
pub async fn auth_pass(who: source::IpAddr, state: Arc<state::State>, req_id: uuid::Uuid, passhash: sha256::Sha256Hash) -> Result<(), Infallible>
|
|
{
|
|
|
|
Ok(())
|
|
}
|