Re: [xwiki-users] Not getting logout from xwiki application
On 12/18/2011 12:57 PM, mohit gupta wrote: i have implemented the single sign on of xwiki with my web application. Basically when i click xwiki hyperlink on my webapplication it takes me to xwiki site hosted on another port without asking the credentials. Behind the scenes it creates an empty user in xwiki databse with no password. Till here its perfect.But when i click on logout on right top of the page it does not do logout. it brings me on the same page.I tried debugging the issue whole day but could not find any concrete finding. when i do the login on xwiki site directly with some created credentials(i mean in giving address in address bar directly)and do the logout it does the log out. I found the major difference is when we do the login manually it sets the username and password in cookies and sets some other stuff too like user principal in request and onlogout it retrieves the same info from cookie and gets successfully logout.But in my case as it creates the empty user i.e with no password it does not set the above stuff in cookie and when i click on logout it stays on the same page.i am not getting how to get thru this. Any help would be highly appreciated. XWiki can perform the logout only if the login mechanism itself can perform the logout from within the XWiki core. So, XWiki cannot, by itself, perform the logout if your SSO mechanism bypasses the XWiki authentication procedure completely. How does your SSO authenticator remember which user is currently logged in? You must undo that process in the logout process. You could override the com.xpn.xwiki.web.LogoutAction class to perform any needed steps. -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Not getting logout from xwiki application
Thanks Sergiu Dumitriu for reply. Issue got resolved .Actually what happens in xwiki when we do logout 3 events gets processed first is logout then view then user gets directed to login screen.In my case during view event, my authentication class was returning xwiki user but it should have returned null. This is what i did. Your reply also confirms that. Thanks again. On Wed, Dec 21, 2011 at 5:35 AM, Sergiu Dumitriu ser...@xwiki.com wrote: On 12/18/2011 12:57 PM, mohit gupta wrote: i have implemented the single sign on of xwiki with my web application. Basically when i click xwiki hyperlink on my webapplication it takes me to xwiki site hosted on another port without asking the credentials. Behind the scenes it creates an empty user in xwiki databse with no password. Till here its perfect.But when i click on logout on right top of the page it does not do logout. it brings me on the same page.I tried debugging the issue whole day but could not find any concrete finding. when i do the login on xwiki site directly with some created credentials(i mean in giving address in address bar directly)and do the logout it does the log out. I found the major difference is when we do the login manually it sets the username and password in cookies and sets some other stuff too like user principal in request and onlogout it retrieves the same info from cookie and gets successfully logout.But in my case as it creates the empty user i.e with no password it does not set the above stuff in cookie and when i click on logout it stays on the same page.i am not getting how to get thru this. Any help would be highly appreciated. XWiki can perform the logout only if the login mechanism itself can perform the logout from within the XWiki core. So, XWiki cannot, by itself, perform the logout if your SSO mechanism bypasses the XWiki authentication procedure completely. How does your SSO authenticator remember which user is currently logged in? You must undo that process in the logout process. You could override the com.xpn.xwiki.web.LogoutAction class to perform any needed steps. -- Sergiu Dumitriu http://purl.org/net/sergiu/ __**_ users mailing list users@xwiki.org http://lists.xwiki.org/**mailman/listinfo/usershttp://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Not getting logout from xwiki application
Folks Please let me know the inputs from your side on below issue. I tried many things from my side but did not work out . latest is below one but still i am not able to logout. What iam trying to do below is if action is logout then redirecting to default page i.e /bin/view/Main but it still does not do logout public XWikiUser checkAuth(XWikiContext context) throws XWikiException { HttpServletRequest req = null; if (context.getRequest()!=null) req = context.getRequest().getHttpServletRequest(); if (req==null) return null; if (context.getAction().equals(logout)) { XWikiResponse response = context.getResponse(); String redirect = context.getURLFactory().createURL(Main, WebHome, view, context).toString(); if (redirect != null) { try { response.sendRedirect(redirect); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); log.error(not able toog out); } } return null; } On Sun, Dec 18, 2011 at 11:27 PM, mohit gupta motgu...@gmail.com wrote: i have implemented the single sign on of xwiki with my web application. Basically when i click xwiki hyperlink on my webapplication it takes me to xwiki site hosted on another port without asking the credentials. Behind the scenes it creates an empty user in xwiki databse with no password. Till here its perfect.But when i click on logout on right top of the page it does not do logout. it brings me on the same page.I tried debugging the issue whole day but could not find any concrete finding. when i do the login on xwiki site directly with some created credentials(i mean in giving address in address bar directly)and do the logout it does the log out. I found the major difference is when we do the login manually it sets the username and password in cookies and sets some other stuff too like user principal in request and onlogout it retrieves the same info from cookie and gets successfully logout.But in my case as it creates the empty user i.e with no password it does not set the above stuff in cookie and when i click on logout it stays on the same page.i am not getting how to get thru this. Any help would be highly appreciated. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users