mirror of
https://github.com/TECHNOFAB11/jwt-authorizer.git
synced 2025-12-12 08:00:07 +01:00
fix: Allow non-root OIDC issuer (#5)
My OIDC endpoint is not at the root and I couldn't use `discover_jwks` because it would strip the path of the issuer. Before: ``` issuer: 'https://example.com/myissuer/' result: 'https://example.com/.well-known/openid-configuration' ``` After: ``` issuer: 'https://example.com/myissuer/' result: 'https://example.com/myissuer/.well-known/openid-configuration' ``` I checked, and having the discovery url not at the root seems to be supported by the standard: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationRequest
This commit is contained in:
parent
ab5f3ffc2c
commit
2bb4b4ca34
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ pub struct OidcDiscovery {
|
|||
pub async fn discover_jwks(issuer: &str) -> Result<String, InitError> {
|
||||
let discovery_url = reqwest::Url::parse(issuer)
|
||||
.map_err(|e| InitError::DiscoveryError(e.to_string()))?
|
||||
.join("/.well-known/openid-configuration")
|
||||
.join(".well-known/openid-configuration")
|
||||
.map_err(|e| InitError::DiscoveryError(e.to_string()))?;
|
||||
reqwest::Client::new()
|
||||
.get(discovery_url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue