mirror of
https://github.com/byo-software/steam-openid-connect-provider.git
synced 2025-01-10 02:16:22 +00:00
Merge pull request #2 from neothor/add-basepath
Added support for PathBase to be used behind a reverse proxy
This commit is contained in:
commit
6372263571
3 changed files with 17 additions and 2 deletions
|
@ -41,7 +41,11 @@ namespace SteamOpenIdConnectProvider
|
||||||
options.UserInteraction.LoginUrl = "/ExternalLogin";
|
options.UserInteraction.LoginUrl = "/ExternalLogin";
|
||||||
})
|
})
|
||||||
.AddAspNetIdentity<IdentityUser>()
|
.AddAspNetIdentity<IdentityUser>()
|
||||||
.AddInMemoryClients(IdentityServerConfig.GetClients(Configuration["OpenID:ClientID"], Configuration["OpenID:ClientSecret"], Configuration["OpenID:RedirectUri"], Configuration["OpenID:PostLogoutRedirectUri"]))
|
.AddInMemoryClients(IdentityServerConfig.GetClients(
|
||||||
|
Configuration["OpenID:ClientID"],
|
||||||
|
Configuration["OpenID:ClientSecret"],
|
||||||
|
Configuration["OpenID:RedirectUri"],
|
||||||
|
Configuration["OpenID:PostLogoutRedirectUri"]))
|
||||||
.AddInMemoryPersistedGrants()
|
.AddInMemoryPersistedGrants()
|
||||||
.AddDeveloperSigningCredential(true)
|
.AddDeveloperSigningCredential(true)
|
||||||
.AddInMemoryIdentityResources(IdentityServerConfig.GetIdentityResources());
|
.AddInMemoryIdentityResources(IdentityServerConfig.GetIdentityResources());
|
||||||
|
@ -63,6 +67,11 @@ namespace SteamOpenIdConnectProvider
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(Configuration["Hosting:PathBase"]))
|
||||||
|
{
|
||||||
|
app.UsePathBase(Configuration["Hosting:PathBase"]);
|
||||||
|
}
|
||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
app.UseIdentityServer();
|
app.UseIdentityServer();
|
||||||
app.UseEndpoints(endpoints =>
|
app.UseEndpoints(endpoints =>
|
||||||
|
|
|
@ -5,5 +5,8 @@
|
||||||
"System": "Information",
|
"System": "Information",
|
||||||
"Microsoft": "Information"
|
"Microsoft": "Information"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"Hosting": {
|
||||||
|
"PathBase": "/test"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,5 +10,8 @@
|
||||||
"RedirectUri": "http://localhost:8080/auth/realms/master/broker/steam/endpoint",
|
"RedirectUri": "http://localhost:8080/auth/realms/master/broker/steam/endpoint",
|
||||||
"PostLogoutRedirectUri": ""
|
"PostLogoutRedirectUri": ""
|
||||||
},
|
},
|
||||||
"AllowedHosts": "*"
|
"AllowedHosts": "*",
|
||||||
|
"Hosting": {
|
||||||
|
"PathBase": ""
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue