在JwtBearerHandler 中,OpenIdConnectConfiguration它只加载一次并“永远”缓存(直到应用程序再次启动)。
进行签名密钥轮换的推荐方法是什么?重新启动应用程序对我不起作用。
从Gremlin.Net响应中获取POCO的最佳方法是什么?
现在,我手动转换为字典:
var results = await gremlinClient.SubmitAsync<Dictionary<string, object>>("g.V()");
var result = results[0];
var properties = (Dictionary<string, object>)result["properties"];
var value = ((Dictionary<string, object>)properties["myValue"].Single())["value"];
Run Code Online (Sandbox Code Playgroud) 存在一个问题,login.live.com该问题阻止了使用身份提供者Microsoft帐户使用MSAL.js for Azure AD B2C 获取访问令牌。
当iframe(msalRenewFrame…)尝试在进行身份验证时https://login.live.com/oauth20_authorize.srf,https://login.live.com/oauth20_authorize.srf尝试进行“框架无效”操作(导航作为主要网站的iframe的父级)。Chrome显示以下警告:
带有URL'https: //login.live.com/oauth20_authorize.srf ?client_id =的框架…尝试使用URL'http:// localhost:4200 /#/ dashboard ' 导航其顶层窗口。从跨域iframe导航顶级窗口将很快需要iframe收到用户手势。参见 https://www.chromestatus.com/features/5851021045661696。
DoSubmit @ oauth20_authorize…
onload @ oauth20_authorize…
这使得主站点重定向,果然acquireTokenSilent成acquireTokenBoisterous。开玩笑。
我试图沙箱msalRenewFrame…与ifr.setAttribute("sandbox", "allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts")根据https://www.w3schools.com/tags/att_iframe_sandbox.asp。现在,主站点没有重定向,但现在Chrome显示错误:
不安全的JavaScript尝试从URL'https://login.live.com/oauth20_authorize.srf?client_id = …的框架尝试启动URL'http:// localhost:4200 /#/ dashboard ' 的框架的导航。顶层窗口是沙盒,但未设置“允许顶部导航”或“允许用户激活顶部导航”的标志。
我认为这种框架爆炸是出于兼容性原因而发生的(我们都知道如何将大量登录重定向到Microsoft服务中)。恐怕这并非易事。但是Chrome很快就会解决它,所以也许背后的团队https://login.live.com/oauth20_authorize.srf已经在使用它了。在此之前,Azure AD B2C与真实帐户和MSAL.js的组合已损坏,无法使用。
我已经在MSAL.js的问题267上发布了此发现,但是由于这不是MSAL.js的问题,我也将其发布在这里。我希望Microsoft客户团队的成员能够看到它,并且可以提供更多信息。
这就是我实例化MSAL的方式:
public initAndHandleRedirects() {
const authority = `https://login.microsoftonline.com/tfp/${environment.msalConfig.tenant}/${environment.msalConfig.signUpSignInPolicy}`;
this.clientApplication = …Run Code Online (Sandbox Code Playgroud) oauth-2.0 framebusting microsoft-account azure-ad-b2c azure-ad-msal
我需要在 powershell 脚本中使用我的 dotnet core 3 程序集之一:
try {
Add-Type -Path "app.dll"
}
catch {
$_.Exception.LoaderExceptions
}
Run Code Online (Sandbox Code Playgroud)
这失败了:
Could not load type 'System.Object' from assembly 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' because the parent does
not exist.
Run Code Online (Sandbox Code Playgroud)
为什么我尝试Add-Type System.Private.CoreLib.lib,出现同样的错误。它似乎适用于 netstandard2.0 程序集,但不适用于我的 netcoreapp3.0 程序集。为了在 powershell 脚本中使用程序集的方法,我该怎么做?
有人知道这个Assert.That属性是为了什么?所有成员Assert都是静态的,那么获取实例有什么意义呢?
我知道NUnit有一个Assert.That针对hamcrest匹配器的方法,但是一个属性似乎没有意义.也许这个属性用于自定义断言作为扩展方法Assert?
.net ×1
.net-core ×1
asp.net-core ×1
azure-ad-b2c ×1
c# ×1
framebusting ×1
gremlin ×1
jwt ×1
oauth-2.0 ×1
powershell ×1
security ×1
unit-testing ×1