diff --git a/clients/src/MvcCode/Startup.cs b/clients/src/MvcCode/Startup.cs index a8ff34c8a..ec23df65b 100644 --- a/clients/src/MvcCode/Startup.cs +++ b/clients/src/MvcCode/Startup.cs @@ -51,7 +51,6 @@ public void ConfigureServices(IServiceCollection services) .AddOpenIdConnect("oidc", options => { options.Authority = Constants.Authority; - options.RequireHttpsMetadata = false; options.ClientId = "mvc.code"; options.ClientSecret = "secret"; @@ -64,16 +63,16 @@ public void ConfigureServices(IServiceCollection services) options.Scope.Add("openid"); options.Scope.Add("profile"); options.Scope.Add("email"); + options.Scope.Add("custom.profile"); options.Scope.Add("resource1.scope1"); options.Scope.Add("resource2.scope1"); - //options.Scope.Add("transaction:123"); - //options.Scope.Add("transaction"); options.Scope.Add("offline_access"); // not mapped by default + options.ClaimActions.MapAll(); options.ClaimActions.MapJsonKey("website", "website"); + options.ClaimActions.MapCustomJson("address", (json) => json.GetRawText()); - // keeps id_token smaller options.GetClaimsFromUserInfoEndpoint = true; options.SaveTokens = true; diff --git a/hosts/Config/ClientsWeb.cs b/hosts/Config/ClientsWeb.cs index a9e7e1d45..ed2d95179 100644 --- a/hosts/Config/ClientsWeb.cs +++ b/hosts/Config/ClientsWeb.cs @@ -16,7 +16,8 @@ public static class ClientsWeb IdentityServerConstants.StandardScopes.Email, "resource1.scope1", "resource2.scope1", - "transaction" + "transaction", + "custom.profile" }; public static IEnumerable Get() diff --git a/hosts/Configuration/Pages/TestUsers.cs b/hosts/Configuration/Pages/TestUsers.cs index c73b4756e..bf91fba62 100644 --- a/hosts/Configuration/Pages/TestUsers.cs +++ b/hosts/Configuration/Pages/TestUsers.cs @@ -19,7 +19,7 @@ public static List Users { street_address = "One Hacker Way", locality = "Heidelberg", - postal_code = 69118, + postal_code = "69118", country = "Germany" }; diff --git a/hosts/EntityFramework/Pages/TestUsers.cs b/hosts/EntityFramework/Pages/TestUsers.cs index c73b4756e..bf91fba62 100644 --- a/hosts/EntityFramework/Pages/TestUsers.cs +++ b/hosts/EntityFramework/Pages/TestUsers.cs @@ -19,7 +19,7 @@ public static List Users { street_address = "One Hacker Way", locality = "Heidelberg", - postal_code = 69118, + postal_code = "69118", country = "Germany" }; diff --git a/hosts/main/Pages/TestUsers.cs b/hosts/main/Pages/TestUsers.cs index c73b4756e..bf91fba62 100644 --- a/hosts/main/Pages/TestUsers.cs +++ b/hosts/main/Pages/TestUsers.cs @@ -19,7 +19,7 @@ public static List Users { street_address = "One Hacker Way", locality = "Heidelberg", - postal_code = 69118, + postal_code = "69118", country = "Germany" };