diff --git a/SS14.Web/Areas/Identity/Pages/Account/Manage/OAuthApps/Create.cshtml.cs b/SS14.Web/Areas/Identity/Pages/Account/Manage/OAuthApps/Create.cshtml.cs index 0814cd1..ada6ff1 100644 --- a/SS14.Web/Areas/Identity/Pages/Account/Manage/OAuthApps/Create.cshtml.cs +++ b/SS14.Web/Areas/Identity/Pages/Account/Manage/OAuthApps/Create.cshtml.cs @@ -62,6 +62,7 @@ public async Task OnPostAsync() new() { Scope = "profile" }, new() { Scope = "email" } }, + AllowedIdentityTokenSigningAlgorithms = "PS256", RedirectUris = new List { new() { RedirectUri = Input.CallbackUrl } diff --git a/SS14.Web/Areas/Identity/Pages/Account/Manage/OAuthApps/Manage.cshtml b/SS14.Web/Areas/Identity/Pages/Account/Manage/OAuthApps/Manage.cshtml index 9a15bbd..11cdf3b 100644 --- a/SS14.Web/Areas/Identity/Pages/Account/Manage/OAuthApps/Manage.cshtml +++ b/SS14.Web/Areas/Identity/Pages/Account/Manage/OAuthApps/Manage.cshtml @@ -45,6 +45,12 @@ +
+
+ + +
+
diff --git a/SS14.Web/Areas/Identity/Pages/Account/Manage/OAuthApps/Manage.cshtml.cs b/SS14.Web/Areas/Identity/Pages/Account/Manage/OAuthApps/Manage.cshtml.cs index a641290..a7c252f 100644 --- a/SS14.Web/Areas/Identity/Pages/Account/Manage/OAuthApps/Manage.cshtml.cs +++ b/SS14.Web/Areas/Identity/Pages/Account/Manage/OAuthApps/Manage.cshtml.cs @@ -44,6 +44,10 @@ public sealed class InputModel [Required] [DisplayName("Require PKCE")] public bool RequirePkce { get; set; } + + [Required] + [DisplayName("Allow PS256 signing")] + public bool AllowPS256 { get; set; } = true; } public Manage(ApplicationDbContext dbContext, UserManager userManager) @@ -62,7 +66,8 @@ public async Task OnGetAsync(int client) Name = App.Client.ClientName, CallbackUrl = App.Client.RedirectUris.FirstOrDefault()?.RedirectUri ?? "", HomepageUrl = App.Client.ClientUri, - RequirePkce = App.Client.RequirePkce + RequirePkce = App.Client.RequirePkce, + AllowPS256 = App.Client.AllowedIdentityTokenSigningAlgorithms?.Contains("PS256") ?? false }; return Page(); @@ -77,6 +82,7 @@ public async Task OnPostUpdateAsync(int client) App.Client.RedirectUris = new List { new() { RedirectUri = Input.CallbackUrl } }; App.Client.ClientUri = Input.HomepageUrl; App.Client.RequirePkce = Input.RequirePkce; + App.Client.AllowedIdentityTokenSigningAlgorithms = Input.AllowPS256 ? "PS256" : null; await _dbContext.SaveChangesAsync();