Update the documentation pages

This commit is contained in:
OpenIddict Bot 2023-03-03 16:06:36 +00:00
parent c2a560183f
commit 09ab729720
3 changed files with 17 additions and 11 deletions

View File

@ -102,8 +102,8 @@
using <strong>individual user accounts authentication</strong> is strongly recommended as it automatically includes the default ASP.NET Core Identity UI, based on Razor Pages.</p>
</li>
<li><p><strong>Update your <code>.csproj</code> file</strong> to reference the latest <code>OpenIddict</code> packages:</p>
<pre><code class="lang-xml">&lt;PackageReference Include=&quot;OpenIddict.AspNetCore&quot; Version=&quot;4.0.0&quot; /&gt;
&lt;PackageReference Include=&quot;OpenIddict.EntityFrameworkCore&quot; Version=&quot;4.0.0&quot; /&gt;
<pre><code class="lang-xml">&lt;PackageReference Include=&quot;OpenIddict.AspNetCore&quot; Version=&quot;4.1.0&quot; /&gt;
&lt;PackageReference Include=&quot;OpenIddict.EntityFrameworkCore&quot; Version=&quot;4.1.0&quot; /&gt;
</code></pre></li>
<li><p><strong>Configure the OpenIddict core, server and validation services</strong> in <code>Startup.ConfigureServices</code>.
Here&#39;s an example for the client credentials grant, used in machine-to-machine scenarios:</p>
@ -226,13 +226,19 @@ Here&#39;s an example for the client credentials grant:</p>
var identity = new ClaimsIdentity(TokenValidationParameters.DefaultAuthenticationType, Claims.Name, Claims.Role);
// Use the client_id as the subject identifier.
identity.AddClaim(Claims.Subject,
await _applicationManager.GetClientIdAsync(application),
Destinations.AccessToken, Destinations.IdentityToken);
identity.SetClaim(Claims.Subject, await _applicationManager.GetClientIdAsync(application));
identity.SetClaim(Claims.Name, await _applicationManager.GetDisplayNameAsync(application));
identity.AddClaim(Claims.Name,
await _applicationManager.GetDisplayNameAsync(application),
Destinations.AccessToken, Destinations.IdentityToken);
identity.SetDestinations(static claim =&gt; claim.Type switch
{
// Allow the &quot;name&quot; claim to be stored in both the access and identity tokens
// when the &quot;profile&quot; scope was granted (by calling principal.SetScopes(...)).
Claims.Name when claim.Subject.HasScope(Scopes.Profile)
=&gt; new[] { Destinations.AccessToken, Destinations.IdentityToken },
// Otherwise, only store the claim in the access tokens.
_ =&gt; new[] { Destinations.AccessToken }
});
return SignIn(new ClaimsPrincipal(identity), OpenIddictServerAspNetCoreDefaults.AuthenticationScheme);
}

View File

@ -264,7 +264,7 @@ To reference the OpenIddict MyGet feed, <strong>create a <code>NuGet.config</cod
<p><strong>OpenIddict</strong> is actively maintained by <strong><a href="https://github.com/kevinchalet">Kévin Chalet</a></strong>. Contributions are welcome and can be submitted using pull requests.</p>
<p><strong>Special thanks to <a href="https://github.com/sponsors/kevinchalet#sponsors">our sponsors</a> for their incredible support</strong>:</p>
<p><a href="https://volosoft.com/"><img src="https://volosoft.com/assets/logos/volosoft-logo-dark.svg" width="500px" alt="Volosoft logo"></a></p>
<p><!-- sponsors --><a href="https://github.com/sebastienros"><img src="https://github.com/sebastienros.png" width="60px" alt="Sébastien Ros"></a><a href="https://github.com/GDreyV"><img src="https://github.com/GDreyV.png" width="60px" alt="Andrew"></a><a href="https://github.com/gustavdw"><img src="https://github.com/gustavdw.png" width="60px" alt=""></a><a href="https://github.com/DovydasNavickas"><img src="https://github.com/DovydasNavickas.png" width="60px" alt="Dovydas Navickas"></a><a href="https://github.com/schmitch"><img src="https://github.com/schmitch.png" width="60px" alt="Schmitt Christian"></a><a href="https://github.com/ThreeScreenStudios"><img src="https://github.com/ThreeScreenStudios.png" width="60px" alt="Thomas W"></a><a href="https://github.com/cryo75"><img src="https://github.com/cryo75.png" width="60px" alt=""></a><a href="https://github.com/florianwachs"><img src="https://github.com/florianwachs.png" width="60px" alt="Florian Wachs"></a><a href="https://github.com/SebastianStehle"><img src="https://github.com/SebastianStehle.png" width="60px" alt="Sebastian Stehle"></a><a href="https://github.com/MichaelHochriegl"><img src="https://github.com/MichaelHochriegl.png" width="60px" alt="Dr_Cox1911"></a><a href="https://github.com/communicatie-cockpit"><img src="https://github.com/communicatie-cockpit.png" width="60px" alt="Communicatie Cockpit"></a><a href="https://github.com/KeithT"><img src="https://github.com/KeithT.png" width="60px" alt=""></a><a href="https://github.com/WGMurray"><img src="https://github.com/WGMurray.png" width="60px" alt=""></a><a href="https://github.com/Skrypt"><img src="https://github.com/Skrypt.png" width="60px" alt="Jasmin Savard"></a><a href="https://github.com/ThomasBjallas"><img src="https://github.com/ThomasBjallas.png" width="60px" alt="Thomas"></a><a href="https://github.com/mcalasa"><img src="https://github.com/mcalasa.png" width="60px" alt="Michael Calasanz"></a><a href="https://github.com/feededit"><img src="https://github.com/feededit.png" width="60px" alt=""></a><a href="https://github.com/BlackSyc"><img src="https://github.com/BlackSyc.png" width="60px" alt="Syc"></a><a href="https://github.com/DigitalOpsDev"><img src="https://github.com/DigitalOpsDev.png" width="60px" alt="DigitalOps Co. Ltd."></a><a href="https://github.com/Thodor12"><img src="https://github.com/Thodor12.png" width="60px" alt="Thom van den Akker"></a><a href="https://github.com/jacojvv-dev"><img src="https://github.com/jacojvv-dev.png" width="60px" alt="Jaco Jansen van Vuuren"></a><a href="https://github.com/EYERIDE-Fleet-Management-System"><img src="https://github.com/EYERIDE-Fleet-Management-System.png" width="60px" alt="EYERIDE Fleet Management System"></a><a href="https://github.com/hypdeb"><img src="https://github.com/hypdeb.png" width="60px" alt="Julien Debache"></a><a href="https://github.com/atrauzzi"><img src="https://github.com/atrauzzi.png" width="60px" alt="Alexander Trauzzi"></a><a href="https://github.com/StanlyLife"><img src="https://github.com/StanlyLife.png" width="60px" alt="Stian Håve"></a><!-- sponsors --></p>
<p><!-- sponsors --><a href="https://github.com/sebastienros"><img src="https://github.com/sebastienros.png" width="60px" alt="Sébastien Ros"></a><a href="https://github.com/GDreyV"><img src="https://github.com/GDreyV.png" width="60px" alt="Andrew"></a><a href="https://github.com/gustavdw"><img src="https://github.com/gustavdw.png" width="60px" alt=""></a><a href="https://github.com/DovydasNavickas"><img src="https://github.com/DovydasNavickas.png" width="60px" alt="Dovydas Navickas"></a><a href="https://github.com/schmitch"><img src="https://github.com/schmitch.png" width="60px" alt="Schmitt Christian"></a><a href="https://github.com/ThreeScreenStudios"><img src="https://github.com/ThreeScreenStudios.png" width="60px" alt="Thomas W"></a><a href="https://github.com/cryo75"><img src="https://github.com/cryo75.png" width="60px" alt=""></a><a href="https://github.com/florianwachs"><img src="https://github.com/florianwachs.png" width="60px" alt="Florian Wachs"></a><a href="https://github.com/SebastianStehle"><img src="https://github.com/SebastianStehle.png" width="60px" alt="Sebastian Stehle"></a><a href="https://github.com/communicatie-cockpit"><img src="https://github.com/communicatie-cockpit.png" width="60px" alt="Communicatie Cockpit"></a><a href="https://github.com/KeithT"><img src="https://github.com/KeithT.png" width="60px" alt=""></a><a href="https://github.com/WGMurray"><img src="https://github.com/WGMurray.png" width="60px" alt=""></a><a href="https://github.com/Skrypt"><img src="https://github.com/Skrypt.png" width="60px" alt="Jasmin Savard"></a><a href="https://github.com/ThomasBjallas"><img src="https://github.com/ThomasBjallas.png" width="60px" alt="Thomas"></a><a href="https://github.com/mcalasa"><img src="https://github.com/mcalasa.png" width="60px" alt="Michael Calasanz"></a><a href="https://github.com/feededit"><img src="https://github.com/feededit.png" width="60px" alt=""></a><a href="https://github.com/DigitalOpsDev"><img src="https://github.com/DigitalOpsDev.png" width="60px" alt="DigitalOps Co. Ltd."></a><a href="https://github.com/Thodor12"><img src="https://github.com/Thodor12.png" width="60px" alt="Thom van den Akker"></a><a href="https://github.com/jacojvv-dev"><img src="https://github.com/jacojvv-dev.png" width="60px" alt="Jaco Jansen van Vuuren"></a><a href="https://github.com/EYERIDE-Fleet-Management-System"><img src="https://github.com/EYERIDE-Fleet-Management-System.png" width="60px" alt="EYERIDE Fleet Management System"></a><a href="https://github.com/salimz1"><img src="https://github.com/salimz1.png" width="60px" alt=""></a><a href="https://github.com/hypdeb"><img src="https://github.com/hypdeb.png" width="60px" alt="Julien Debache"></a><a href="https://github.com/StanlyLife"><img src="https://github.com/StanlyLife.png" width="60px" alt="Stian Håve"></a><a href="https://github.com/RwnRchrds"><img src="https://github.com/RwnRchrds.png" width="60px" alt="Rowan Richards"></a><a href="https://github.com/ravindUwU"><img src="https://github.com/ravindUwU.png" width="60px" alt="Ravindu Liyanapathirana"></a><a href="https://github.com/dlandi"><img src="https://github.com/dlandi.png" width="60px" alt="HieronymusBlaze"></a><!-- sponsors --></p>
<hr>
<h2 id="license">License</h2>
<p>This project is licensed under the <strong>Apache License</strong>. This means that you can use, modify and distribute it freely.

View File

@ -1612,7 +1612,7 @@
"output": {
".html": {
"relative_path": "guides/getting-started.html",
"hash": "mT272boRGfEMUWq6J++rhg=="
"hash": "bmEep/5YBpDf6EdVoax3Gg=="
}
},
"is_incremental": false,
@ -1694,7 +1694,7 @@
"output": {
".html": {
"relative_path": "index.html",
"hash": "gVlUuQJLJ4mqh8IoFgj9AQ=="
"hash": "EzKrSmlomALjvzfgGUHPng=="
}
},
"is_incremental": false,