1
0

validating user without consuming Authentication

This commit is contained in:
EAimTY 2023-02-05 22:12:36 +09:00
parent 645550dd95
commit 2c1f8e1a64
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "tuic-quinn"
version = "0.1.0-pre-alpha1"
version = "0.1.0-pre-alpha2"
authors = ["EAimTY <ea.imty@gmail.com>"]
description = "A thin layer on top of quinn to provide functions for TUIC"
categories = ["network-programming"]
@ -16,5 +16,5 @@ bytes = { version = "1.4.0", default-features = false, features = ["std"] }
futures-util = { version = "0.3.26", default-features = false, features = ["io", "std"] }
quinn = { version = "0.9.3", default-features = false, features = ["futures-io"] }
thiserror = { version = "1.0.38", default-features = false }
tuic = { version = "5.0.0-pre-alpha5", default-features = false, features = ["async_marshal", "marshal", "model"] }
tuic = { version = "5.0.0-pre-alpha6", default-features = false, features = ["async_marshal", "marshal", "model"] }
uuid = { version = "1.3.0", default-features = false, features = ["std"] }

View File

@ -128,7 +128,7 @@ impl Connection<side::Client> {
pub async fn authenticate(&self, uuid: Uuid, password: impl AsRef<[u8]>) -> Result<(), Error> {
let model = self
.model
.send_authenticate(uuid, password, self.keying_material_exporter());
.send_authenticate(uuid, password, &self.keying_material_exporter());
let mut send = self.conn.open_uni().await?;
model.header().async_marshal(&mut send).await?;
@ -380,8 +380,8 @@ impl Authenticate {
}
/// Validates if the given password is matching the hashed token.
pub fn validate(self, password: impl AsRef<[u8]>) -> bool {
self.model.is_valid(password, self.exporter)
pub fn validate(&self, password: impl AsRef<[u8]>) -> bool {
self.model.is_valid(password, &self.exporter)
}
}