aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-08 15:27:05 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-08 15:27:05 -0800
commitb44fd9a78c1505258178a51201e8abea9977baa5 (patch)
tree851d1b02231b241bf72e5810006a42bb3b4f8279 /rust
parentfee4f9e8957f7f51acb320ec880de166377807f7 (diff)
downloadfatcat-b44fd9a78c1505258178a51201e8abea9977baa5.tar.gz
fatcat-b44fd9a78c1505258178a51201e8abea9977baa5.zip
/auth/oidc endpoint has 31 day limit
Diffstat (limited to 'rust')
-rw-r--r--rust/src/api_wrappers.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/api_wrappers.rs b/rust/src/api_wrappers.rs
index 818a41c2..22b5f857 100644
--- a/rust/src/api_wrappers.rs
+++ b/rust/src/api_wrappers.rs
@@ -1161,10 +1161,10 @@ impl Api for Server {
)?;
auth_context.require_role(FatcatRole::Superuser)?;
let (editor, created) = self.auth_oidc_handler(params, &conn)?;
- // create an auth token; leave it to webface to attenuate to a given duration
+ // create an auth token with 31 day duration
let token = self.auth_confectionary.create_token(
FatCatId::from_str(&editor.editor_id.clone().unwrap())?,
- None,
+ Some(chrono::Duration::days(31)),
)?;
let result = AuthOidcResult { editor, token };
Ok((result, created))