summaryrefslogtreecommitdiffstats
path: root/src/api
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-26 21:48:54 +0100
committertv <tv@krebsco.de>2026-10-26 21:48:54 +0100
commitecdb3ee944f5c171faac3a71117e2ff27e064295 (patch)
treea8e35f4dec4de93c7d53416da43fc4f9a3a381ed /src/api
parent7135c860db4169bfc9a06838cf637350ef68c0c0 (diff)
turn all pub into pub(crate)
Diffstat (limited to 'src/api')
-rw-r--r--src/api/auth.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/auth.rs b/src/api/auth.rs
index c07db74..d58640e 100644
--- a/src/api/auth.rs
+++ b/src/api/auth.rs
@@ -50,7 +50,7 @@ fn load_users(path: &str) -> anyhow::Result<HashMap<String, String>> {
}
#[derive(Clone)]
-pub struct AuthState {
+pub(crate) struct AuthState {
idle_timeout: Duration,
users: Arc<HashMap<String, String>>, // user -> PHC hash string
@@ -60,7 +60,7 @@ pub struct AuthState {
}
impl AuthState {
- pub fn new(path: &str) -> anyhow::Result<Self> {
+ pub(crate) fn new(path: &str) -> anyhow::Result<Self> {
let users = load_users(path)?;
Ok(Self {
@@ -136,7 +136,7 @@ async fn verify(state: &AuthState, user: &str, pass: String, hash: String) -> bo
verified
}
-pub async fn basic_auth(
+pub(crate) async fn basic_auth(
State(state): State<AuthState>,
headers: HeaderMap,
mut request: Request<Body>,