move token_shadow to pbs_config workspace

Also moved out crypt.rs (libcrypt bindings) to pbs_tools workspace.
This commit is contained in:
Dietmar Maurer
2021-09-08 14:00:14 +02:00
parent 6f4228809e
commit 1cb08a0a05
8 changed files with 91 additions and 82 deletions

View File

@ -4,6 +4,7 @@ use anyhow::{format_err, Error};
use std::sync::Arc;
use pbs_tools::ticket::{self, Ticket};
use pbs_config::token_shadow;
use crate::api2::types::{Authid, Userid};
use crate::auth_helpers::*;
@ -131,7 +132,7 @@ impl ApiAuth for UserApiAuth {
.decode_utf8()
.map_err(|_| format_err!("failed to decode API token header"))?;
crate::config::token_shadow::verify_secret(&tokenid, &tokensecret)?;
token_shadow::verify_secret(&tokenid, &tokensecret)?;
Ok(tokenid)
}