Open improwise opened 4 years ago
This probably means that some updates are necessary for the article as well as some of the definitions are not correct any more
https://vmsdurano.com/apiboilerplate-and-identityserver4-access-control-for-apis/
So, basically, remove Scope definition from ApiResources, then create a new class with something like this (a bit rough but still)
internal static class ScopeManager
{
public static IEnumerable<ApiScope> Scopes =>
new List<ApiScope>
{
new ApiScope(name: "app.api.whatever.read", displayName: "Read your data."),
new ApiScope(name: "app.api.whatever.write", displayName: "Write your data."),
new ApiScope(name: "app.api.whatever.delete", displayName: "Delete your data.")
};
}
and add in Startup:
.AddInMemoryApiScopes(Data.ScopeManager.Scopes)
Hi,
Great demo but it breaks once you update Identity Server to latest version, ApiResource more specifically.
Thanks.