Skip to content

Makes OIDC metadata URL configurable. Closes #1328 #1329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DevProxy.Plugins/Mocking/AuthPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public override async Task InitializeAsync(InitArgs e, CancellationToken cancell
return;
}

await SetupOpenIdConnectConfigurationAsync();
await SetupOpenIdConnectConfigurationAsync(Configuration.OAuth2.MetadataUrl);
}

Enabled = false;
Expand Down Expand Up @@ -187,12 +187,12 @@ public override Task BeforeRequestAsync(ProxyRequestArgs e, CancellationToken ca
return Task.CompletedTask;
}

private async Task SetupOpenIdConnectConfigurationAsync()
private async Task SetupOpenIdConnectConfigurationAsync(string metadataUrl)
{
try
{
var retriever = new OpenIdConnectConfigurationRetriever();
var configurationManager = new ConfigurationManager<OpenIdConnectConfiguration>("https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration", retriever);
var configurationManager = new ConfigurationManager<OpenIdConnectConfiguration>(metadataUrl, retriever);
_openIdConnectConfiguration = await configurationManager.GetConfigurationAsync();
}
catch (Exception ex)
Expand Down