aboutsummaryrefslogtreecommitdiff
path: root/lockchain-core/src/users/mod.rs
blob: 3fce31c6e9dba3c8110e0c38d3b260fef71dab0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! User and access regulation module
//!
//! Access can be given for a vault or file (based on id)
//! as well as an entire Api endpoint. By default all
//! Rust APIs assume `{ Api, Admin }` access, for other
//! APIs crates (http, ...), a user with access rights
//! has to be specified.
//!
//! A user for an API endpoint is not the same as a user for
//! a vault. An API admin could have access to a vault where
//! they can only read a single file!
//!
//! `User` is also a serialisable struct which contains important
//! data to load and store them into a metadata store.
#![allow(deprecated)]

mod auth;
mod user;
mod rights;
mod tokens;
mod keystore;

mod secrets;
pub mod userstore;

pub use self::auth::pam_authenticate;
pub use self::keystore::KeyStore;
pub use self::tokens::Token;
pub use self::user::User;

pub use errors::AuthError;
pub use self::rights::{Access, Role};

use std::collections::HashMap;
use {
    meta::MetaDomain,
    traits::{AutoEncoder, Base64AutoEncoder},
};