IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

binding to ClientName from the Logout-View?

Open riankol opened this issue 10 years ago • 3 comments

Thanks a lot for the usefull examples you've provided! I've built an app with identityserver4, using your MVC Hybrid Client example as basis. But I encountered this: In the LogoutController says the Submit-method:

            var logout = await _interaction.GetLogoutContextAsync(logoutId);
            var vm = new LoggedOutViewModel()
            {
                PostLogoutRedirectUri = logout.PostLogoutRedirectUri,
                ClientName = logout.ClientId,
                SignOutIframeUrl = logout.SignOutIFrameUrl
            };
            return View("LoggedOut", vm);

I want to bind ClientName to logout.ClientName, as I don't want the id to be displayed in the Logout-View. But logout does not have a ClientName attribute. Did I miss something anywhere? Or is it impossible to bind to the ClientName from the Logout-view?

riankol avatar Aug 24 '16 10:08 riankol

I'd suggest that you inject the IClientStore into your controller, and then lookup the Client configuration (and thus the name) from the ClientId passed via the context.

brockallen avatar Aug 25 '16 15:08 brockallen

All set on this?

brockallen avatar Aug 26 '16 21:08 brockallen

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 15 '20 15:01 lock[bot]