Discovery document generation bug
Issue / Steps to reproduce the problem
- Populate ApiResource List
public static IEnumerable<ApiResource> GetApiResources()
{
return new List<ApiResource> {
new ApiResource("api1", "My API #1"),
new ApiResource("api2", "My API #2"),
new ApiResource("logsapi", "My API #3"),
new ApiResource("logsApi1", "My API #4"),
new ApiResource("logs_api", "My API #5"),
new ApiResource
{
Name = "logsapi2",
DisplayName = "My API #6"
},
new ApiResource
{
Name = "LogsPapi3",
DisplayName = "My API #6",
Description = "My API #6 or #7"
}
};
}
-
Update database. So ApiResources table looks according to ApiResource List: Id DisplayName Enabled Name 1 My API #1 1 api1 2 My API #2 1 api2 3 My API #3 1 logsapi 4 My API #4 1 logsApi1 5 My API #5 1 logs_api 6 My API #6 1 logsapi2 7 My API #6 1 LogsPapi3
-
Discovery document has only first 5 declared api, 2 missing (logsapi2 and LogsPapi3):
"scopes_supported": [
"api1",
"api2",
"logsapi",
"logsApi1",
"logs_api",
"offline_access"
],
All Nuget packages are up to date. ConfigurationDbContext populated correctly.
You need to define at least one scope for each API resource -
the ctor with api name does that automatically for you, if you use the property approach you need to do that manually.
That fixed it, thank you
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.