mirror of
https://gitee.com/dcren/openiddict-documentation.git
synced 2025-09-19 18:19:56 +08:00
Update the documentation pages
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<title>Application permissions </title>
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<meta name="title" content="Application permissions ">
|
||||
<meta name="generator" content="docfx 2.24.0.0">
|
||||
<meta name="generator" content="docfx 2.45.1.0">
|
||||
|
||||
<link rel="shortcut icon" href="../favicon.ico">
|
||||
<link rel="stylesheet" href="../styles/docfx.vendor.css">
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
</head>
|
||||
<body data-spy="scroll" data-target="#affix">
|
||||
<body data-spy="scroll" data-target="#affix" data-offset="120">
|
||||
<div id="wrapper">
|
||||
<header>
|
||||
|
||||
@@ -146,9 +146,9 @@ token endpoints but will get an error when trying to send an introspection or re
|
||||
options.IgnoreEndpointPermissions();
|
||||
});
|
||||
</code></pre><h2 id="grant-type-permissions">Grant type permissions</h2>
|
||||
<h3 id="definition">Definition</h3>
|
||||
<h3 id="definition-1">Definition</h3>
|
||||
<p>Grant type permissions limit the flows a client application is allowed to use.</p>
|
||||
<h3 id="supported-permissions">Supported permissions</h3>
|
||||
<h3 id="supported-permissions-1">Supported permissions</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -181,7 +181,7 @@ token endpoints but will get an error when trying to send an introspection or re
|
||||
</table>
|
||||
<p>To add a custom flow permission, you can use the following pattern:</p>
|
||||
<pre><code class="lang-csharp">OpenIddictConstants.Permissions.Prefixes.GrantType + "custom_flow_name"
|
||||
</code></pre><h3 id="example">Example</h3>
|
||||
</code></pre><h3 id="example-1">Example</h3>
|
||||
<p>In the following example, the <code>postman</code> application can only use the authorization code flow
|
||||
while <code>console</code> is restricted to the <code>password</code> and <code>refresh_token</code> flows:</p>
|
||||
<pre><code class="lang-csharp">if (await manager.FindByClientIdAsync("postman") == null)
|
||||
@@ -224,11 +224,11 @@ if (await manager.FindByClientIdAsync("console") == null)
|
||||
options.IgnoreGrantTypePermissions();
|
||||
});
|
||||
</code></pre><h2 id="scope-permissions">Scope permissions</h2>
|
||||
<h3 id="definition">Definition</h3>
|
||||
<h3 id="definition-2">Definition</h3>
|
||||
<p>Scope permissions limit the scopes (standard or custom) a client application is allowed to use.</p>
|
||||
<blockquote><p>The <code>openid</code> and <code>offline_access</code> scopes are special-cased by OpenIddict and don't require explicit permissions.</p>
|
||||
</blockquote>
|
||||
<h3 id="supported-permissions">Supported permissions</h3>
|
||||
<h3 id="supported-permissions-2">Supported permissions</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -261,7 +261,7 @@ if (await manager.FindByClientIdAsync("console") == null)
|
||||
</table>
|
||||
<p>To add a custom scope permission, you can use the following pattern:</p>
|
||||
<pre><code class="lang-csharp">OpenIddictConstants.Permissions.Prefixes.Scope + "custom_scope_name"
|
||||
</code></pre><h3 id="example">Example</h3>
|
||||
</code></pre><h3 id="example-2">Example</h3>
|
||||
<p>In the following sample, the <code>angular</code> client is allowed to request the <code>address</code>,
|
||||
<code>profile</code> and <code>marketing_api</code> scopes: any other scope will result in an error being returned.</p>
|
||||
<pre><code class="lang-csharp">if (await manager.FindByClientIdAsync("angular") == null)
|
||||
@@ -317,7 +317,7 @@ if (await manager.FindByClientIdAsync("console") == null)
|
||||
<a href="#top">Back to top</a>
|
||||
</span>
|
||||
|
||||
<span>Copyright © 2015-2017 Microsoft<br>Generated by <strong>DocFX</strong></span>
|
||||
<span>Generated by <strong>DocFX</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
Reference in New Issue
Block a user