mirror of
https://gitee.com/dcren/openiddict-documentation.git
synced 2025-04-24 18:04:57 +08:00
Update the documentation pages
This commit is contained in:
parent
cba2410ca1
commit
f5c3113d95
@ -171,7 +171,7 @@ Here's an example for the client credentials grant, used in machine-to-machi
|
||||
// to replace the default OpenIddict entities.
|
||||
options.UseOpenIddict();
|
||||
});
|
||||
</code></pre><div class="WARNING"><h5>Warning</h5><p>Important: if you change the default entity primary key (e.g. to <code>int</code> or <code>Guid</code> instead of <code>string</code>), make sure you use the <code>options.ReplaceDefaultEntities<TKey>()</code>
|
||||
</code></pre><div class="WARNING"><h5>Warning</h5><p>If you change the default entity primary key (e.g. to <code>int</code> or <code>Guid</code> instead of <code>string</code>), make sure you use the <code>options.ReplaceDefaultEntities<TKey>()</code>
|
||||
core extension accepting a <code>TKey</code> generic argument and use the generic <code>options.UseOpenIddict<TKey>()</code> overload to configure EF Core to use the specified type:</p>
|
||||
<pre><code class="lang-csharp">services.AddOpenIddict()
|
||||
.AddCore(options =>
|
||||
|
@ -98,10 +98,10 @@
|
||||
<PackageReference Include="OpenIddict" Version="2.0.0-rc3-final" />
|
||||
<PackageReference Include="OpenIddict.EntityFrameworkCore" Version="2.0.0-rc3-final" />
|
||||
</ItemGroup>
|
||||
</code></pre><div class="TIP"><h5>Tip</h5><p>Note: if you have an explicit reference to <code>AspNet.Security.OAuth.Validation</code> or <code>OpenIddict.Mvc</code>,
|
||||
</code></pre><div class="TIP"><h5>Tip</h5><p>If you have an explicit reference to <code>AspNet.Security.OAuth.Validation</code> or <code>OpenIddict.Mvc</code>,
|
||||
you can safely remove these dependencies: they are now transitively referenced by the <code>OpenIddict</code> metapackage.</p>
|
||||
</div>
|
||||
<div class="IMPORTANT"><h5>Important</h5><p>Note: if your application references <code>OpenIddict.Models</code> or <code>OpenIddict.Stores</code>, you MUST remove them as these packages are no longer used in rc3.</p>
|
||||
<div class="IMPORTANT"><h5>Important</h5><p>If your application references <code>OpenIddict.Models</code> or <code>OpenIddict.Stores</code>, you MUST remove them as these packages are no longer used in rc3.</p>
|
||||
</div>
|
||||
<h2 id="use-the-new-openiddict-services-registration-apis">Use the new OpenIddict services registration APIs</h2>
|
||||
<p>To offer a better user experience, the registrations APIs exposed by OpenIddict have been reworked. Updating your code should be quite straightforward:</p>
|
||||
@ -184,7 +184,7 @@ services.AddAuthentication()
|
||||
// ... by:
|
||||
services.AddOpenIddict()
|
||||
.AddValidation();
|
||||
</code></pre><div class="TIP"><h5>Tip</h5><p>Note: the OpenIddict validation handler lives in the <code>OpenIddict.Validation</code> package, which is referenced by the <code>OpenIddict</code> metapackage.
|
||||
</code></pre><div class="TIP"><h5>Tip</h5><p>The OpenIddict validation handler lives in the <code>OpenIddict.Validation</code> package, which is referenced by the <code>OpenIddict</code> metapackage.
|
||||
You don't have to explicitly add a new <code>PackageReference</code> in your <code>.csproj</code> file to be able to use it.</p>
|
||||
</div>
|
||||
<h2 id="if-necessary-create-new-application-entries">If necessary, create new application entries</h2>
|
||||
@ -279,9 +279,9 @@ and new features like <strong>application permissions</strong>, that allow limit
|
||||
<p><strong>Migrating to OpenIddict rc2 (<code>1.0.0-rc2-final</code> and <code>2.0.0-rc2-final</code>) requires making changes in your database</strong>: existing properties have been reworked
|
||||
(e.g <a href="https://github.com/openiddict/openiddict-core/issues/497">to work around a MySQL limitation</a>) and new ones have been added to support the new features.
|
||||
This procedure is quite easy and only requires a few minutes.</p>
|
||||
<blockquote><p>Note: this guide assumes your application uses the OpenIddict Entity Framework Core 2.x stores. If you use a custom store, changes will have to be made manually.
|
||||
<div class="TIP"><h5>Tip</h5><p>This guide assumes your application uses the OpenIddict Entity Framework Core 2.x stores. If you use a custom store, changes will have to be made manually.
|
||||
A list of added/updated/renamed columns is available at the end of this guide.</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
<h2 id="ensure-migrations-are-correctly-enabled-for-your-project">Ensure migrations are correctly enabled for your project</h2>
|
||||
<p><strong>Before migrating to OpenIddict rc2, make sure migrations are already enabled for your application</strong>. If you have a <code>Migrations</code>
|
||||
folder in your application root folder and an <code>__EFMigrationsHistory</code> table in your database, you're good to go.</p>
|
||||
|
@ -45,7 +45,7 @@
|
||||
"output": {
|
||||
".html": {
|
||||
"relative_path": "guide/getting-started.html",
|
||||
"hash": "+jOyF8NSMA1jX6YFLsLZ2g=="
|
||||
"hash": "k1o8zpuQI9iJpTrsbnkNzg=="
|
||||
}
|
||||
},
|
||||
"is_incremental": false,
|
||||
@ -69,7 +69,7 @@
|
||||
"output": {
|
||||
".html": {
|
||||
"relative_path": "guide/migration.html",
|
||||
"hash": "bvvYc3G4nMiAfEPUg03lxg=="
|
||||
"hash": "aAwfoySJhpae4kPX3x95Yw=="
|
||||
}
|
||||
},
|
||||
"is_incremental": false,
|
||||
|
Loading…
Reference in New Issue
Block a user