Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use strings for postal codes in test users #1451

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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