// ========================================================================== // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex UG (haftungsbeschraenkt) // All rights reserved. Licensed under the MIT license. // ========================================================================== using Squidex.Web; namespace Squidex.Areas.IdentityServer { public static class Startup { public static void ConfigureIdentityServer(this IApplicationBuilder app) { var environment = app.ApplicationServices.GetRequiredService(); app.Map(Constants.PrefixIdentityServer, builder => { if (environment.IsDevelopment()) { builder.UseDeveloperExceptionPage(); } else { builder.UseExceptionHandler("/error"); } builder.UseRouting(); builder.UseAuthentication(); builder.UseAuthorization(); builder.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }); } } }