Azure AD에서 DotNetOpenAuth 라이브러리를 통해 인증 토큰을 얻으려고합니다. 나는 거대한 프로젝트가 .net 3.5에 있고 ADAL이 .net 3.5 (only .net> 4)를 지원하지 않기 때문에 ADAL을 사용하고 싶지 않다. 그러나 Azure AD와 함께 작동시킬 수는 없습니다. 나는 무엇을 구성해야할지 모른다. 지금까지 내가 가지고있는 것입니다 :Azure AD에서 Dotnetopenauth로 인증 토큰 받기
private static WebServerClient _webServerClient;
private static string _accessToken;
// Client ID (as obtained from Azure AD portal)
private static string clientId = "here goes my client id guid";
// Client Secret (as obtained from Azure AD portal)
private static string appKey = "here goes my secret";
private static string aadInstance = "https://login.microsoftonline.com/{0}";
private static string tenant = "mytenant.domain.com";
private static string authority = string.Format(CultureInfo.InvariantCulture, aadInstance, tenant);
// Azure AD resource I am trying to access
private static string serviceResourceId = "https://mytenant.domain.com/protectedresource";
private static void InitializeWebServerClient()
{
var authorizationServer = new AuthorizationServerDescription
{
AuthorizationEndpoint = new Uri(""/* WHAT TO PUT HERE */),
TokenEndpoint = new Uri(""/* WHAT TO PUT HERE */)
};
_webServerClient = new WebServerClient(authorizationServer, clientId, appKey);
}
private static void RequestToken()
{
var state = _webServerClient.GetClientAccessToken();
_accessToken = state.AccessToken;
}
static void Main(string[] args) {
InitializeWebServerClient();
RequestToken();
}
문제는 무엇을 배치 해야할지 모르겠습니다.
AuthorizationEndpoint = 새로운 열린 우리당 (""/* 여기 */을 넣어 무엇),
TokenEndpoint = 새로운 열린 우리당을 (""/* 무엇을 : 나는 여기에 배치해야합니다 값 모르겠어요 여기 PUT */)