diff --git a/docs/en/Migration-Guides/IdentityServer_To_OpenIddict.md b/docs/en/Migration-Guides/IdentityServer_To_OpenIddict.md new file mode 100644 index 0000000000..7496cde34f --- /dev/null +++ b/docs/en/Migration-Guides/IdentityServer_To_OpenIddict.md @@ -0,0 +1,38 @@ +# Migration Identity Server to OpenIddict Guides + +1. Replace all `Volo.Abp.IdentityServer.*` packages with corresponding `Volo.Abp.OpenIddict.*` packages. eg `Volo.Abp.IdentityServer.Domain` to `Volo.Abp.OpenIddict.Domain`. +2. Replace all `IdentityServer` modules with corresponding `OpenIddict` modules. eg `AbpIdentityServerDomainModule` to `AbpOpenIddictDomainModule`. +3. Rename the `ConfigureIdentityServer` to `ConfigureOpenIddict` in your `ProjectNameDbContext` class. +4. Remove the `UseIdentityServer` and add `UseAbpOpenIddictValidation` after `UseAuthentication`. +5. Add follow code to your startup module. +```cs +public override void PreConfigureServices(ServiceConfigurationContext context) +{ + PreConfigure(builder => + { + builder.AddValidation(options => + { + options.AddAudiences("MyProjectName"); + options.UseLocalServer(); + options.UseAspNetCore(); + }); + }); +} +``` +6. If your project is not separate AuthServer please also add `ForwardIdentityAuthenticationForBearer` +```cs +private void ConfigureAuthentication(ServiceConfigurationContext context) +{ + context.Services.ForwardIdentityAuthenticationForBearer(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme); +} +``` +7. Try compiling the project in the IDE and following the errors to remove and reference the code and namespaces. +8. Create a new version of the project, then copy `MyProjectName.Domain\OpenIddict\OpenIddictDataSeedContributor.cs` into your project, and update your `\appsettings.json` base on `MyProjectName.DbMigrator\appsettings.json` +9. Add migrations and update the database if you are using EF Core as the database provider. + +If in doubt with the above steps, create a new project to compare the code, or refer to the test project in the module + + +[OpenIddict module document](https://docs.abp.io/en/abp/6.0/Modules/OpenIddict) + +[OpenIddict module source code](https://github.com/abpframework/abp/tree/rel-6.0/modules/openiddict) \ No newline at end of file diff --git a/docs/en/Modules/OpenIddict.md b/docs/en/Modules/OpenIddict.md index ed25147be2..9e603f76a8 100644 --- a/docs/en/Modules/OpenIddict.md +++ b/docs/en/Modules/OpenIddict.md @@ -1,9 +1,5 @@ ## ABP OpenIddict Modules -## How to Install - -TODO: - ## User Interface This module implements the domain logic and database integrations, but not provides any UI. Management UI is useful if you need to add applications and scopes on the fly. In this case, you may build the management UI yourself or consider to purchase the [ABP Commercial](https://commercial.abp.io/) which provides the management UI for this module.