ADAL.Net 3.x에서 UserPasswordCredential은 2.x에서 UserCredential 위에 도입되었습니다. 그러나 동일한 UserPasswordCredential은 .Net Core에서 동일한 Nuget 패키지로 노출되지 않습니다.ADAL .Net Core nuget 패키지는 UserPasswordCredential을 지원하지 않습니다.
UserCredential 클래스 된 UserPasswordCredential 이후
namespace Microsoft.IdentityModel.Clients.ActiveDirectory
{
//
// Summary:
// Credential used for integrated authentication on domain-joined machines.
public class UserCredential
{
//
// Summary:
// Constructor to create user credential. Using this constructor would imply integrated
// authentication with logged in user and it can only be used in domain joined scenarios.
public UserCredential();
//
// Summary:
// Constructor to create credential with client id and secret
//
// Parameters:
// userName:
// Identifier of the user application requests token on behalf.
public UserCredential(string userName);
//
// Summary:
// Gets identifier of the user.
public string UserName { get; }
}
}
가 .NetCore에서 사용할 수 없습니다 및 UserCredential 방법에 입력 한 사용자의 암호를하고 닷넷 핵심 코드 아래에 구현하는 하나의 매개 변수의 이름을, 소요 단 하나의 등록 사용자 이름을 가지고 ?
authContext.AcquireTokenAsync(WebAPIResourceId, ClientId, userPasswordCredential);
나는 닷넷 코어 1.0 버전 3.13.4 버전 특히 ADAL를 사용하지하고
가능한 중복 http://stackoverflow.com/questions/37465949/adal-net-v3-does -not-support-acquiretoken-with-usercredential) – blowdart
동일한 패키지 및 동일한 버전으로 .NET Core에서 UserPasswordCredential을 사용할 수 없습니다. – racha