我有一个看起来像这样的解决方案:
IdentitySErvice4和WCF服务都使用功能证书.客户端正在使用从Windows应用商店加载的客户端证书.客户端服务通过带有第三方软件的智能卡安装到Windows应用商店.如果删除该卡,则会从商店中删除该证书.
流程如下:
1客户端从商店加载证书并将其绑定到takeenhandler,如下所示:
public override TokenClient GetTokenClient(string host, string port)
{
var certificate = SmartCardHandler.GetInstance().Result.CurrentCertificate();
if (certificate == null)
throw new Exception("Certificate is missing");
var handler = new WebRequestHandler();
handler.ServerCertificateValidationCallback = PinPublicKey;
var url = $"https://{host}:{port}/connect/token";
handler.ClientCertificates.Add(certificate);
return new TokenClient(url, ClientTypes.Siths, "secret", handler);
}
token = await tokenClient.RequestCustomGrantAsync(ClientTypes.Siths, "MyApp.wcf offline_access");
Run Code Online (Sandbox Code Playgroud)
2.客户端将请求发送到IdentityServices,IdentityServices读取客户端证书并使用它进行身份验证并生成返回的客户端令牌.
3.客户端使用客户端证书为服务创建WCF通道,令牌也像这样附加到此通道
private async Task<ChannelFactory<T>> CreateChannelFactory(LoginTypeBase loginType, MyAppToken token)
{
var service = await _ConsulService.GetServiceBlocking(loginType.MyAppServicesToUse, forceRefresh: true, token: new CancellationTokenSource(TimeSpan.FromSeconds(30)).Token);
if …Run Code Online (Sandbox Code Playgroud) 我正在测试一个图像捕获库,它通过代码库发送为常规头文件和以"*.a"扩展名结尾的文件.我不熟悉使用这种格式的文件,似乎无法找到正确的搜索"魔力".
此文件扩展名代表什么?
如果需要额外的步骤来将其与我的XCode项目集成,该怎么办?