How do you add parameters to an IdentityServer LogoutRequest model?

心已入冬 提交于 2021-01-07 03:44:32

问题


I'm using the Identity oidc-client-js library and calling

this.usermanager.signoutRedirect({ somedata: someObject.Id });

Then in the logout endpoint I do this with the IdentityServer interaction service

var logoutRequest= await _interaction.GetLogoutContextAsync(logoutId);

I would have expected the somedata to show up in the Parameters property of the LogoutRequest but it doesn't. So how do I add some extra parameters to the signout?

I noticed I can return a { state: 'somedata' } but I don't actually know how to retrieve that from the LogoutRequest object either. So if I can't add my own parameters how do I retrieve the state data?

Thanks!


回答1:


you gotta do this

this.usermanager.signoutRedirect({ extraQueryParams: { 'key': 'value' } });

Then they'll show up in the Parameters property in the LogoutRequest



来源:https://stackoverflow.com/questions/60643257/how-do-you-add-parameters-to-an-identityserver-logoutrequest-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!