Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

IdentityServer4 EnableSignOutPrompt #162

Closed
BlackMoon opened this issue Jul 18, 2016 · 9 comments
Closed

IdentityServer4 EnableSignOutPrompt #162

BlackMoon opened this issue Jul 18, 2016 · 9 comments
Labels

Comments

@BlackMoon
Copy link

BlackMoon commented Jul 18, 2016

Hi All!

Does IdentityServer4 Host implement
AuthenticationOptions.EnableSignOutPrompt = false behaviour?

Thanks

@leastprivilege
Copy link
Member

Since the UI is not controller by IS anymore - this feature does not exist anymore as well

@BlackMoon
Copy link
Author

Since the UI is not controller by IS anymore

And what about PostLogoutRedirectUris ? Redirect after logout also not implemented?

@leastprivilege
Copy link
Member

leastprivilege commented Jul 18, 2016

As I said - in IS4 we don't implement any UI. We will provide a default implementation - but nothing will be built into our core library.

We released beta5 yesterday - look at our reference host to see how this is implemented now

https://github.com/IdentityServer/IdentityServer4/tree/dev/src/Host

@BlackMoon
Copy link
Author

BlackMoon commented Jul 18, 2016

We released beta5 yesterday - look at our reference host to see how this is implemented now

Now I see:

public class LogoutController : Controller
{
        [HttpGet("ui/logout", Name = "Logout")]
        public IActionResult Index(string logoutId)
        {
            ViewData["logoutId"] = logoutId;
            return View();
        }

        [HttpPost("ui/logout")]
        [ValidateAntiForgeryToken]
        public async Task<IActionResult> Submit(string logoutId)
        {
            await HttpContext.Authentication.SignOutAsync(Constants.DefaultCookieAuthenticationScheme);

            // set this so UI rendering sees an anonymous user
            HttpContext.User = new ClaimsPrincipal(new ClaimsIdentity());

            var logout = await _interaction.GetLogoutContextAsync(logoutId);

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

logoutId url param always null in Index and also in Submit methods.
What value it must contains?

@leastprivilege
Copy link
Member

did you try it with one of our sample clients from the samples repo?

@BlackMoon
Copy link
Author

BlackMoon commented Jul 18, 2016

My client - WebForm ASPX site with OWIN Environment.

It use owin -

app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
            {
                AuthenticationType = config.AuthenticationType,
                SignInAsAuthenticationType = config.SignInAsAuthenticationType,
                Authority = config.Authority,
                ClientId = config.ClientId,
                RedirectUri = config.RedirectUri,
                ResponseType = config.ResponceType,
                Scope = config.Scope,
                UseTokenLifetime = config.UseTokenLifetime

instead of aspnet core (in example) -

app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions
            {
                Authority = "http://localhost:1941",
                RequireHttpsMetadata = false,

                EnableCaching = true,

                ScopeName = "api1",
                ScopeSecret = "secret",
                AutomaticAuthenticate = true
            });

```,

Maybe here's dismiss?

@leastprivilege
Copy link
Member

i don't follow. UseIdentityServerAuthentication is for APIs

the Katana MW does not add the necessary parameters automatically - check our IdentityServer3 samples repo - e.g.

https://github.com/IdentityServer/IdentityServer3.Samples/blob/master/source/Clients/MVC%20OWIN%20Client%20(Hybrid)/Startup.cs#L87

@BlackMoon
Copy link
Author

the Katana MW does not add the necessary parameters automatically

Thanks.
Here's the reason.

@lock
Copy link

lock bot commented Jan 15, 2020

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 lock bot locked as resolved and limited conversation to collaborators Jan 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants