mirror of
https://github.com/warp-tech/warpgate.git
synced 2025-09-06 22:55:24 +08:00
#1056 - auto-strip .well-known/openid-configuration from OIDC URLs
This commit is contained in:
parent
38bdbade69
commit
7e49f13084
1 changed files with 10 additions and 1 deletions
|
@ -153,7 +153,16 @@ impl SsoInternalProviderConfig {
|
|||
SsoInternalProviderConfig::Azure { tenant, .. } => {
|
||||
IssuerUrl::new(format!("https://login.microsoftonline.com/{tenant}/v2.0"))?
|
||||
}
|
||||
SsoInternalProviderConfig::Custom { issuer_url, .. } => issuer_url.clone(),
|
||||
SsoInternalProviderConfig::Custom { issuer_url, .. } => {
|
||||
let mut url = issuer_url.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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue