summaryrefslogtreecommitdiff
path: root/server/src/fake_auth.rs
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2022-12-27 19:55:10 -0500
committerKjetil Orbekk <kj@orbekk.com>2022-12-27 19:58:45 -0500
commit21b7b57336cd3bf7bd328ada38c6069a48504f85 (patch)
treec0d47337f584403febcfc9ec365ea1ea810e782e /server/src/fake_auth.rs
parent3418ebf4db2375e0dfe2343da57d674e1f4fd57f (diff)
`cargo fmt`
Diffstat (limited to 'server/src/fake_auth.rs')
-rw-r--r--server/src/fake_auth.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/server/src/fake_auth.rs b/server/src/fake_auth.rs
index c0574af..6a3ff2c 100644
--- a/server/src/fake_auth.rs
+++ b/server/src/fake_auth.rs
@@ -6,11 +6,14 @@ use std::{
use async_trait::async_trait;
use chrono::Utc;
-use openidconnect::{RefreshToken, AccessToken};
+use openidconnect::{AccessToken, RefreshToken};
use reqwest::Url;
use crate::{
- auth::{AuthenticatedSession, Authenticator, SessionId, store_authenticated_session},
+ auth::{
+ store_authenticated_session, AuthenticatedSession, Authenticator,
+ SessionId,
+ },
error::{self, BridgeError},
};
@@ -70,8 +73,11 @@ impl Authenticator for FakeAuthenticator {
}
async fn get_login_url(&self) -> (SessionId, reqwest::Url) {
- let auth_url =
- Url::parse(&format!("{}/api/fake_login", env::var("APP_URL").unwrap())).unwrap();
+ let auth_url = Url::parse(&format!(
+ "{}/api/fake_login",
+ env::var("APP_URL").unwrap()
+ ))
+ .unwrap();
let user_id = SessionId::new();
self.login_cache
.lock()