IdentityModel恢复性概念性问题
我使用以下代码通过OIDC登录。这是一个带有Identitymodel.oidcclient 5.0.0
的UWP应用程序,
LoginRequest loginRequest = new LoginRequest
{
FrontChannelExtraParameters = new IdentityModel.Client.Parameters(parameter)
};
LoginResult result = await IdentityManager.GetOidcClient().LoginAsync(loginRequest);
因此在loginResult
中,我有reforshtoken IdentityToken accessToken accessToken
用于在代码中使用。我不明白的是,在令牌到期后,我得到http401
,我称之为
RefreshTokenResult result = await IdentityManager.GetOidcClient().RefreshTokenAsync(
result.RefreshToken);
成功也将获得成功。我的问题是如何将RefreshTokenResult
的值(例如refreshtoken IdentityToken AccessToken
)回到loginResult
? (loginResult
具有内部集合属性是我无法设置的原因)
还是我做错了?我碰巧找不到具有OIDC实现的单个样本。感谢您的支持。
I use the following code to log in via OIDC. This is a UWP app with IdentityModel.OidcClient 5.0.0
LoginRequest loginRequest = new LoginRequest
{
FrontChannelExtraParameters = new IdentityModel.Client.Parameters(parameter)
};
LoginResult result = await IdentityManager.GetOidcClient().LoginAsync(loginRequest);
So in the LoginResult
, I have the RefreshToken IdentityToken AccessToken
to use in the code. What I don't understand is after token expiration I get HTTP401
and I call
RefreshTokenResult result = await IdentityManager.GetOidcClient().RefreshTokenAsync(
result.RefreshToken);
This is also getting success. My issue is how do I get the RefreshTokenResult
's values such as RefreshToken IdentityToken AccessToken
back to the LoginResult
? (LoginResult
has internal-set properties is the reason I can't set it)
Or Am I doing this wrong? I can't happen to find a single sample with an OIDC implementation. Appreciate your support.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论