diff --git a/OAuth.Authentik/Program.cs b/OAuth.Authentik/Program.cs index 630092c..d7918ec 100644 --- a/OAuth.Authentik/Program.cs +++ b/OAuth.Authentik/Program.cs @@ -15,8 +15,8 @@ builder.Services.AddAuthentication(options => .AddOpenIdConnect("oidc", options => { options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme; - - + + options.CallbackPath = "/signin-oidc"; options.Authority = "https://oauth.e1lama.ru/application/o/asp_net"; options.ClientId = ""; @@ -29,7 +29,7 @@ builder.Services.AddAuthentication(options => options.Scope.Add("profile"); options.Scope.Add("email"); - options.GetClaimsFromUserInfoEndpoint = true; + options.GetClaimsFromUserInfoEndpoint = false; options.TokenValidationParameters = new Microsoft.IdentityModel.Tokens.TokenValidationParameters { @@ -73,7 +73,7 @@ var summaries = new[] app.MapGet("/me", (HttpContext ctx) => { - return ctx.User.Claims.Select(x => (x.Type, x.Value)); + return ctx.User.Claims.Select(x => $"{x.Type} {x.Value}"); }) .RequireAuthorization() .WithOpenApi();