Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
balaji-jr committed Sep 27, 2024
1 parent bab4dba commit 053ec59
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions server/src/handlers/http/oidc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ use actix_web::{
};
use http::StatusCode;
use openid::{Options, Token, Userinfo};
use regex::Regex;
use serde::Deserialize;
use ulid::Ulid;
use url::Url;
use regex::Regex;

use crate::{
handlers::{COOKIE_AGE_DAYS, OIDC_SCOPE, SESSION_COOKIE_NAME, USER_COOKIE_NAME},
Expand Down Expand Up @@ -67,8 +67,10 @@ pub async fn login(
let conn = req.connection_info().clone();
let base_url_without_scheme = format!("{}/", conn.host());

if !is_valid_redirect_url(&base_url_without_scheme, query.redirect.as_str() ) {
return Err(OIDCError::BadRequest("Bad Request, Invalid redirect url!".to_string()));
if !is_valid_redirect_url(&base_url_without_scheme, query.redirect.as_str()) {
return Err(OIDCError::BadRequest(
"Bad Request, Invalid Redirect URL!".to_string(),
));
}

let oidc_client = req.app_data::<Data<DiscoveredClient>>();
Expand Down

0 comments on commit 053ec59

Please sign in to comment.