diff options
Diffstat (limited to 'src/api/auth.rs')
| -rw-r--r-- | src/api/auth.rs | 6 |
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>, |
