diff --git a/configuration/application-permissions.html b/configuration/application-permissions.html index 5a73cce..acf8b21 100644 --- a/configuration/application-permissions.html +++ b/configuration/application-permissions.html @@ -283,8 +283,8 @@ if (await manager.FindByClientIdAsync("console") is null) options.IgnoreScopePermissions(); });
-> [!NOTE] --> Response type permissions were introduced in OpenIddict 3.0.
+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
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>();
--> });
-->
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:
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 0cdd8b1..e166fd9 100644 --- a/manifest.json +++ b/manifest.json @@ -9,7 +9,7 @@ "output": { ".html": { "relative_path": "configuration/application-permissions.html", - "hash": "T82L6dl/gd6zRNmoTwudtw==" + "hash": "a8OSMGZypwh8fbDrsgSY+A==" } }, "is_incremental": false, @@ -45,7 +45,7 @@ "output": { ".html": { "relative_path": "guide/getting-started.html", - "hash": "PAK5Gf5at4cqxIPy5Io9pg==" + "hash": "lkMk8zUcxDGnyHX220VRdQ==" } }, "is_incremental": false,