0
設置ApiResource的範圍祕密的最佳方法是什麼?在這方面,我發現了很多IdentityServer3的引用,但沒有一個引用到新版本。一個代碼示例會很棒。我很確定我只是定義了這個錯誤,但不能在我的生活中纏住我的頭。這是我現在的代碼:IdentityServer4設置範圍祕密
using IdentityServer4.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace SomeProgram.Configurations
{
public class Scopes
{
public static IEnumerable<ApiResource> GetApiResources()
{
return new List<ApiResource>
{
new ApiResource("MyAPI", "My API")
};
}
}
}
我該怎麼補充?我拿走了什麼?我已經閱讀了文檔,並且無法找到特定於我的問題的實例。