diff --git a/guide/migration/20-to-30.md b/guide/migration/20-to-30.md index f4b63f3..70761ad 100644 --- a/guide/migration/20-to-30.md +++ b/guide/migration/20-to-30.md @@ -103,6 +103,21 @@ consider moving to `System.Text.Json` when migrating to OpenIddict 3.0, as 3.0 n In most cases, this should be as simple as replacing `JsonConvert.SerializeObject()`/`JsonConvert.DeserializeObject()` by their `System.Text.Json` equivalent: `JsonSerializer.Serialize()`/`JsonSerializer.Deserialize()`. +## Replace calls to the `AuthenticationTicket` extensions by their new `ClaimsPrincipal` equivalent: + +OpenIddict 3.0 no longer uses the `AuthenticationTicket` type provided by ASP.NET Core. Instead, everything is now stored in the `ClaimsPrincipal` instance. +If you have calls like `ticket.SetScopes()` or `ticket.SetResources()`, use their new equivalents (e.g `principal.SetScopes()` or `principal.SetResources()`). + +## Use the new authentication schemes + +In 3.0, the constants used as the ASP.NET Core authentication schemes have changed: + +| Old constant name | New constant name (ASP.NET Core host) | +|---------------------------------------------------|-------------------------------------------------------------| +| OpenIddictServerDefaults.AuthenticationScheme | OpenIddictServerAspNetCoreDefaults.AuthenticationScheme | +| OpenIddictValidationDefaults.AuthenticationScheme | OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme | +| OAuthValidationDefaults.AuthenticationScheme | OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme | + ## 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