Skip to content

Commit

Permalink
Merge pull request #1451 from DuendeSoftware/joe/postal
Browse files Browse the repository at this point in the history
Use strings for postal codes in test users
  • Loading branch information
brockallen authored Oct 30, 2023
2 parents be9ce62 + aa07df3 commit b8dcda5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
7 changes: 3 additions & 4 deletions clients/src/MvcCode/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion hosts/Config/ClientsWeb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public static class ClientsWeb
IdentityServerConstants.StandardScopes.Email,
"resource1.scope1",
"resource2.scope1",
"transaction"
"transaction",
"custom.profile"
};

public static IEnumerable<Client> Get()
Expand Down
2 changes: 1 addition & 1 deletion hosts/Configuration/Pages/TestUsers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static List<TestUser> Users
{
street_address = "One Hacker Way",
locality = "Heidelberg",
postal_code = 69118,
postal_code = "69118",
country = "Germany"
};

Expand Down
2 changes: 1 addition & 1 deletion hosts/EntityFramework/Pages/TestUsers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static List<TestUser> Users
{
street_address = "One Hacker Way",
locality = "Heidelberg",
postal_code = 69118,
postal_code = "69118",
country = "Germany"
};

Expand Down
2 changes: 1 addition & 1 deletion hosts/main/Pages/TestUsers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static List<TestUser> Users
{
street_address = "One Hacker Way",
locality = "Heidelberg",
postal_code = 69118,
postal_code = "69118",
country = "Germany"
};

Expand Down

0 comments on commit b8dcda5

Please sign in to comment.