aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/lib.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-12-28 14:52:38 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-12-28 15:45:10 -0800
commitf9408344464285870409c2209a8edc8d25fd9bfa (patch)
tree386e2472c22e9c79f8a58e2f419c9fbaef00dd13 /rust/src/lib.rs
parentfa1892834a4650bf2e85215a3270e309d3e9f1c9 (diff)
downloadfatcat-f9408344464285870409c2209a8edc8d25fd9bfa.tar.gz
fatcat-f9408344464285870409c2209a8edc8d25fd9bfa.zip
start refactor of auth code
Pulls auth code (which requires the persistent state of a signing keyring) into a struct. Doesn't try verify macaroon in middleware, do it in individual wrappers.
Diffstat (limited to 'rust/src/lib.rs')
-rw-r--r--rust/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
index f081be25..43911868 100644
--- a/rust/src/lib.rs
+++ b/rust/src/lib.rs
@@ -117,7 +117,8 @@ pub fn server() -> Result<api_server::Server> {
let pool = diesel::r2d2::Pool::builder()
.build(manager)
.expect("Failed to create database pool.");
- Ok(api_server::Server { db_pool: pool })
+ let confectionary = auth::AuthConfectionary::new();
+ Ok(api_server::Server { db_pool: pool, auth_confectionary: confectionary })
}
pub fn test_server() -> Result<api_server::Server> {