From ef8ded2a46b5aa37205c2e1508272a7e98072fab Mon Sep 17 00:00:00 2001 From: OpenIddict Bot <32257313+openiddict-bot@users.noreply.github.com> Date: Wed, 28 Jul 2021 14:56:39 +0000 Subject: [PATCH] Update the documentation pages --- guide/migration/20-to-30.html | 15 ++++++++++----- manifest.json | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/guide/migration/20-to-30.html b/guide/migration/20-to-30.html index c4f6766..19f64ca 100644 --- a/guide/migration/20-to-30.html +++ b/guide/migration/20-to-30.html @@ -174,15 +174,16 @@ the pass-through mode for these endpoints, so that requests can reach your autho { options.UseDataProtection(); }); -

Enable request caching

-

If previously application was using request caching functionality, the new way to toggle request caching feature (previously options.EnableRequestCaching()) to use OpenIddictServerAspNetCoreBuilder class methods (divided into explicit methods):

+

Use the new request caching APIs, if applicable

+

In 3.0, the OpenIddictServerBuilder.EnableRequestCaching() API - that enabled request caching for both authorization and logout request - +was replaced by 2 separate methods. If your application depends on request caching, don't forget to enable it when migrating to 3.0:

services.AddOpenIddict()
     .AddServer(options =>
     {
         options.UseAspNetCore()
-            .EnableAuthorizationRequestCaching()
-            .EnableLogoutRequestCaching();
-    })
+              .EnableAuthorizationRequestCaching()
+              .EnableLogoutRequestCaching();
+    });
 

Replace JSON.NET by System.Text.Json

If you use JSON.NET to serialize or deserialize OpenIdConnectMessage, OpenIdConnectRequest or OpenIdConnectResponse instances, consider moving to System.Text.Json when migrating to OpenIddict 3.0, as 3.0 no longer includes a built-in JSON.NET JsonConverter for these types.

@@ -215,6 +216,10 @@ If you have calls like ticket.SetScopes() or ticket.SetResour +
Note

In 3.0, the OpenIddict server ASP.NET Core handler supports authenticating userinfo requests. As such, if you use the pass-through mode +to handle userinfo requests in your own userinfo MVC action, consider using OpenIddictServerAspNetCoreDefaults.AuthenticationScheme +instead of OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme for your userinfo endpoint to avoid duplicate access token validation.

+

Update your application to work with the new scope format

In OpenIddict 3.0, the format of the scope claim used in JWT tokens has changed from a JSON array to a single space-separated claim to match the JWT access token specification. To ensure your authorization policies diff --git a/manifest.json b/manifest.json index 3c8b77e..5855a69 100644 --- a/manifest.json +++ b/manifest.json @@ -11476,7 +11476,7 @@ "output": { ".html": { "relative_path": "guide/migration/20-to-30.html", - "hash": "yqEm8nzGBcc1/9QKfsQ/Vg==" + "hash": "u8C7XDs7MEh19Wb8vD83fw==" } }, "is_incremental": false,