![](/img/trans.png)
[英]Xamarin.Forms & Adal Authentication 4 AcquireTokenAsync
[英]Missing Resources after installing ADAL Package for Xamarin.Forms PCL
我正在开发Xamarin.Forms PCL移动应用程序,需要访问需要通过Azure进行身份验证的内部API。 我的同事给了我一个可以在控制台应用程序中使用的代码段,我正在尝试使其适合我的移动应用程序。
我能够成功将ADAL软件包添加到PCL。 但是,身份验证要求我为每个特定于平台的版本传递一组PlatformParameters
。 当我尝试将ADAL包添加到Xamarin.Android项目时,在Resource.Designer.cs
文件中收到以下错误:
ERROR: 'Resource.Id' does not contain a definition for 'agentWebView'
ERROR: 'Resource.Layout' does not contain a definition for 'WebAuthenticationBroker'
Resource.Designer.cs
中相关的代码(自动生成)是:
global::Microsoft.Experimental.IdentityModel.Clients.ActiveDirectory.Resource.Id.agentWebView = global::MissionControlAuth.Droid.Resource.Id.agentWebView;
global::Microsoft.Experimental.IdentityModel.Clients.ActiveDirectory.Resource.Layout.WebAuthenticationBroker = global::MissionControlAuth.Droid.Resource.Layout.WebAuthenticationBroker;
这些缺少的资源的名称表明,我需要将ADAL包指向一个可用于向用户显示登录页面的Web视图。 不幸的是,我在StackOverflow或Xamarin论坛上找不到任何提及。 如何为Xamarin.Forms PCL正确设置ADAL软件包?
平台/库版本
重现步骤
不支持实验库。 请切换至https://www.nuget.org/packages/Microsoft.Identity.Client上可用的MSAL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.