diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-31 17:40:51 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-12-31 17:40:51 -0800 |
commit | b930bf22d4974363934514919539149a69b15167 (patch) | |
tree | a8ff4edf1e0e7a8d680bd82f4416c9fda8282440 /rust/src/auth.rs | |
parent | e661263baab5ff791986aaa6cc5d4996b149d4ce (diff) | |
download | fatcat-b930bf22d4974363934514919539149a69b15167.tar.gz fatcat-b930bf22d4974363934514919539149a69b15167.zip |
allow multiple 'alt' keys to be specified in env
Diffstat (limited to 'rust/src/auth.rs')
-rw-r--r-- | rust/src/auth.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/src/auth.rs b/rust/src/auth.rs index 16fd4fe2..4b608a96 100644 --- a/rust/src/auth.rs +++ b/rust/src/auth.rs @@ -198,6 +198,12 @@ impl AuthConfectionary { .unwrap() } + pub fn add_keypair(&mut self, identifier: String, key_base64: String) -> Result<()> { + let key = BASE64.decode(key_base64.as_bytes())?; + self.root_keys.insert(identifier, key); + Ok(()) + } + pub fn create_token( &self, editor_id: FatCatId, |