Skip to content

Commit

Permalink
Update config.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Oct 23, 2024
1 parent 3e12cdb commit b51b02d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions warpgate-sso/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,13 @@ impl SsoInternalProviderConfig {
}
SsoInternalProviderConfig::Custom { issuer_url, .. } => {
let mut url = issuer_url.url().clone();
let path = url.path().to_owned();
if let Some(path) = path.strip_suffix("/.well-known/openid-configuration") {
url.set_path(path);
let url_string = url.to_string();
IssuerUrl::new(url_string.trim_end_matches('/').into())?
} else {
issuer_url.clone()
}
let path = url.path();
let path = path
.strip_suffix(".well-known/openid-configuration")
.unwrap_or(path)
.to_owned();
url.set_path(&path);
IssuerUrl::from_url(url)
}
})
}
Expand Down

0 comments on commit b51b02d

Please sign in to comment.