diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-28 22:50:47 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-28 22:50:47 -0800 |
commit | 156b10220a50f6f441e7484235e227316f26761e (patch) | |
tree | 316ccf3a5081b7b43f2a570173d52818acab58f2 /rust/src/auth.rs | |
parent | d50f7729cbc86c62dba9bd4db80786f07b44a7c0 (diff) | |
download | fatcat-156b10220a50f6f441e7484235e227316f26761e.tar.gz fatcat-156b10220a50f6f441e7484235e227316f26761e.zip |
basic auth unittests
Diffstat (limited to 'rust/src/auth.rs')
-rw-r--r-- | rust/src/auth.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/rust/src/auth.rs b/rust/src/auth.rs index 8e9a6309..0fe21ebe 100644 --- a/rust/src/auth.rs +++ b/rust/src/auth.rs @@ -58,10 +58,7 @@ impl AuthConfectionary { DUMMY_KEY.to_vec()) } - pub fn create_token(&self, conn: &DbConn, editor_id: FatCatId, expires: Option<DateTime<Utc>>) -> Result<String> { - let _ed: EditorRow = editor::table - .find(&editor_id.to_uuid()) - .get_result(conn)?; + pub fn create_token(&self, editor_id: FatCatId, expires: Option<DateTime<Utc>>) -> Result<String> { let mut mac = Macaroon::create(&self.location, &self.key, &self.identifier).expect("Macaroon creation"); mac.add_first_party_caveat(&format!("editor_id = {}", editor_id.to_string())); // TODO: put created one second in the past to prevent timing synchronization glitches? |