From 4edb9324305c3fa5fa427ffbb464d48fa0c536ce Mon Sep 17 00:00:00 2001 From: OpenIddict Bot <32257313+openiddict-bot@users.noreply.github.com> Date: Wed, 13 Jan 2021 04:59:49 +0000 Subject: [PATCH] Update the documentation pages --- configuration/application-permissions.html | 5 +-- guide/getting-started.html | 46 +++++++++++----------- manifest.json | 4 +- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/configuration/application-permissions.html b/configuration/application-permissions.html index 039b1ea..5a73cce 100644 --- a/configuration/application-permissions.html +++ b/configuration/application-permissions.html @@ -283,9 +283,8 @@ if (await manager.FindByClientIdAsync("console") is null) options.IgnoreScopePermissions(); });
-> [!NOTE]
-+Response type permissions were introduced in OpenIddict 3.0.
-
-> [!NOTE] +-> Response type permissions were introduced in OpenIddict 3.0.
Response type permissions limit the response types a client application is allowed to use when implementing an interactive flow like code, implicit or hybrid.
-> [!WARNING]
--Important: if you change the default entity primary key (e.g. to
-int
orGuid
instead ofstring
), make sure you use theoptions.ReplaceDefaultEntities<TKey>()
-core extension accepting aTKey
generic argument and use the genericoptions.UseOpenIddict<TKey>()
overload to configure Entity Framework Core to use the specified key type:services.AddOpenIddict() - .AddCore(options => - { - // Configure OpenIddict to use the default entities with a custom key type. - options.UseEntityFrameworkCore() - .UseDbContext<ApplicationDbContext>() - .ReplaceDefaultEntities<Guid>(); - }); - -services.AddDbContext<ApplicationDbContext>(options => -{ - // Configure the context to use Microsoft SQL Server. - options.UseSqlServer(configuration["Data:DefaultConnection:ConnectionString"]); - - options.UseOpenIddict<Guid>(); -}); -
-> [!WARNING]
+-> Important: if you change the default entity primary key (e.g. to int
or Guid
instead of string
), make sure you use the options.ReplaceDefaultEntities<TKey>()
+-> core extension accepting a TKey
generic argument and use the generic options.UseOpenIddict<TKey>()
overload to configure EF Core to use the specified type:
+->
+-> csharp
+-> services.AddOpenIddict()
+-> .AddCore(options =>
+-> {
+-> // Configure OpenIddict to use the default entities with a custom key type.
+-> options.UseEntityFrameworkCore()
+-> .UseDbContext<ApplicationDbContext>()
+-> .ReplaceDefaultEntities<Guid>();
+-> });
+->
+-> services.AddDbContext<ApplicationDbContext>(options =>
+-> {
+-> // Configure the context to use Microsoft SQL Server.
+-> options.UseSqlServer(configuration["Data:DefaultConnection:ConnectionString"]);
+->
+-> options.UseOpenIddict<Guid>();
+-> });
+->
Create your own authorization controller: 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:
diff --git a/manifest.json b/manifest.json index 4219688..346796e 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "output": { ".html": { "relative_path": "configuration/application-permissions.html", - "hash": "bn2oc9vnYnRCNd31rO4mnw==" + "hash": "T82L6dl/gd6zRNmoTwudtw==" } }, "is_incremental": false, @@ -45,7 +45,7 @@ "output": { ".html": { "relative_path": "guide/getting-started.html", - "hash": "EubGbQd6qMqQ/UD3oj2WIw==" + "hash": "G5Z0qYgQEEbzw1G+VpiRHg==" } }, "is_incremental": false,