mirror of
https://gitee.com/dcren/openiddict-documentation.git
synced 2025-11-10 03:14:45 +08:00
Update the documentation pages
This commit is contained in:
@@ -283,8 +283,8 @@ if (await manager.FindByClientIdAsync("console") is null)
|
|||||||
options.IgnoreScopePermissions();
|
options.IgnoreScopePermissions();
|
||||||
});
|
});
|
||||||
</code></pre><h2 id="response-type-permissions">Response type permissions</h2>
|
</code></pre><h2 id="response-type-permissions">Response type permissions</h2>
|
||||||
<p>-> [!NOTE]
|
<div class="NOTE"><h5>Note</h5><p>Response type permissions were introduced in OpenIddict 3.0.</p>
|
||||||
-> Response type permissions were introduced in OpenIddict 3.0.</p>
|
</div>
|
||||||
<h3 id="definition-3">Definition</h3>
|
<h3 id="definition-3">Definition</h3>
|
||||||
<p>Response type permissions limit the response types a client application is allowed to use when implementing an interactive flow like code, implicit or hybrid.</p>
|
<p>Response type permissions limit the response types a client application is allowed to use when implementing an interactive flow like code, implicit or hybrid.</p>
|
||||||
<h3 id="supported-permissions-3">Supported permissions</h3>
|
<h3 id="supported-permissions-3">Supported permissions</h3>
|
||||||
|
|||||||
@@ -171,31 +171,26 @@ Here's an example for the client credentials grant, used in machine-to-machi
|
|||||||
// to replace the default OpenIddict entities.
|
// to replace the default OpenIddict entities.
|
||||||
options.UseOpenIddict();
|
options.UseOpenIddict();
|
||||||
});
|
});
|
||||||
</code></pre></li>
|
</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>
|
||||||
</ul>
|
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>
|
||||||
<p>-> [!WARNING]
|
<pre><code class="lang-csharp">services.AddOpenIddict()
|
||||||
-> 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>
|
.AddCore(options =>
|
||||||
-> 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:
|
{
|
||||||
->
|
// Configure OpenIddict to use the default entities with a custom key type.
|
||||||
-> <code>csharp
|
options.UseEntityFrameworkCore()
|
||||||
-> services.AddOpenIddict()
|
.UseDbContext<ApplicationDbContext>()
|
||||||
-> .AddCore(options =>
|
.ReplaceDefaultEntities<Guid>();
|
||||||
-> {
|
});
|
||||||
-> // Configure OpenIddict to use the default entities with a custom key type.
|
|
||||||
-> options.UseEntityFrameworkCore()
|
services.AddDbContext<ApplicationDbContext>(options =>
|
||||||
-> .UseDbContext<ApplicationDbContext>()
|
{
|
||||||
-> .ReplaceDefaultEntities<Guid>();
|
// Configure the context to use Microsoft SQL Server.
|
||||||
-> });
|
options.UseSqlServer(configuration["Data:DefaultConnection:ConnectionString"]);
|
||||||
->
|
|
||||||
-> services.AddDbContext<ApplicationDbContext>(options =>
|
options.UseOpenIddict<Guid>();
|
||||||
-> {
|
});
|
||||||
-> // Configure the context to use Microsoft SQL Server.
|
</code></pre></div>
|
||||||
-> options.UseSqlServer(configuration["Data:DefaultConnection:ConnectionString"]);
|
</li>
|
||||||
->
|
|
||||||
-> options.UseOpenIddict<Guid>();
|
|
||||||
-> });
|
|
||||||
-></code></p>
|
|
||||||
<ul>
|
|
||||||
<li><p><strong>Create your own authorization controller:</strong>
|
<li><p><strong>Create your own authorization controller:</strong>
|
||||||
Implementing a custom authorization controller is required to allow OpenIddict to create tokens based on the identities and claims you provide.
|
Implementing a custom authorization controller is required to allow OpenIddict to create tokens based on the identities and claims you provide.
|
||||||
Here's an example for the client credentials grant:</p>
|
Here's an example for the client credentials grant:</p>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"output": {
|
"output": {
|
||||||
".html": {
|
".html": {
|
||||||
"relative_path": "configuration/application-permissions.html",
|
"relative_path": "configuration/application-permissions.html",
|
||||||
"hash": "T82L6dl/gd6zRNmoTwudtw=="
|
"hash": "a8OSMGZypwh8fbDrsgSY+A=="
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"is_incremental": false,
|
"is_incremental": false,
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
"output": {
|
"output": {
|
||||||
".html": {
|
".html": {
|
||||||
"relative_path": "guide/getting-started.html",
|
"relative_path": "guide/getting-started.html",
|
||||||
"hash": "PAK5Gf5at4cqxIPy5Io9pg=="
|
"hash": "lkMk8zUcxDGnyHX220VRdQ=="
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"is_incremental": false,
|
"is_incremental": false,
|
||||||
|
|||||||
Reference in New Issue
Block a user