mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-01-09 15:54:46 +00:00
Use Box to store UserID and DeviceID
Userid and DeviceID are of unknown size, use Box to be able to store them into the userdevicesessionid_uiaarequest BTreeMap
This commit is contained in:
parent
720a54b3bb
commit
c4a438460e
@ -21,7 +21,7 @@ use super::abstraction::Tree;
|
|||||||
pub struct Uiaa {
|
pub struct Uiaa {
|
||||||
pub(super) userdevicesessionid_uiaainfo: Arc<dyn Tree>, // User-interactive authentication
|
pub(super) userdevicesessionid_uiaainfo: Arc<dyn Tree>, // User-interactive authentication
|
||||||
pub(super) userdevicesessionid_uiaarequest:
|
pub(super) userdevicesessionid_uiaarequest:
|
||||||
RwLock<BTreeMap<(String, String, String), CanonicalJsonValue>>,
|
RwLock<BTreeMap<(Box<UserId>, Box<DeviceId>, String), CanonicalJsonValue>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Uiaa {
|
impl Uiaa {
|
||||||
@ -155,8 +155,8 @@ impl Uiaa {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.insert(
|
.insert(
|
||||||
(
|
(
|
||||||
user_id.to_string(),
|
user_id.to_owned(),
|
||||||
device_id.to_string(),
|
device_id.to_owned(),
|
||||||
session.to_string(),
|
session.to_string(),
|
||||||
),
|
),
|
||||||
request.to_owned(),
|
request.to_owned(),
|
||||||
@ -176,8 +176,8 @@ impl Uiaa {
|
|||||||
.read()
|
.read()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.get(&(
|
.get(&(
|
||||||
user_id.to_string(),
|
user_id.to_owned(),
|
||||||
device_id.to_string(),
|
device_id.to_owned(),
|
||||||
session.to_string(),
|
session.to_string(),
|
||||||
))
|
))
|
||||||
.map(|j| j.to_owned()))
|
.map(|j| j.to_owned()))
|
||||||
|
Loading…
Reference in New Issue
Block a user