如何在 Owin 启动中将值从 OnRedirectToIdentityProvider 传递到 OnAuthenticationFailed

问题描述 投票:0回答:1

我有 owin 和 OIDC none MVC .net 应用程序。 我想知道是否有任何方法可以在 Owin Startup 的 OnRedirectToIdentityProvider 中设置一个值(如环境变量或参数)并在 OnAuthenticationFailed 中访问它?

我尝试了 setParameter 和 Add.Environment 但没有成功。 OnAuthenticationFailed 中的上下文不包含其中任何一个。

任何建议将不胜感激!

谢谢,

玛丽亚姆

.net openid-connect owin startup
1个回答
0
投票

创建并发字典会起作用,但我使用了完全不同的方法。 SetParameter 和 Add.Environment 将不起作用

© www.soinside.com 2019 - 2024. All rights reserved.