logout

django logout redirects me to administration page

孤街浪徒 提交于 2019-11-28 22:45:29
I have provided a simple login functionality. For logout, I tried to use the built-in one. This is my urls.py: (r'', include('django.contrib.auth.urls')), And this is my template file: {% if user.is_authenticated %} logged in as {{ user }} (<a href="{% url "logout" %}">logout</a>) {% else %} I have also enabled the default django admin site. When I click logout , it shows me the administration logout view. How can I pass the logout next page attribute to tell django which view to render? If you are seeing the log out page of the Django administration site instead of your own log out page (your

CAS单点登出实现案例

痴心易碎 提交于 2019-11-28 20:08:37
单点登出的实现比较简单,就是简单的几个配置。 如果直接调用cas的logout的url进行登出,则会暴露cas的登出界面 显然这不是我们想要的,通常登出的需求是:退出当前账户,然后将url重定向到登录界面。 于是我用了一个蠢笨的方式来实现: 干货模式开启: 1、在页面的退出按钮下的function function fn_logout(){ $.ajax({ url:"../user/logout", type:'post' }); window.location.href="https://cas.demo.com:8443/cas/logout?service=http://127.0.0.1:8089/portal/user/login"; } 老规矩,贴图片详解 2、然后我把Controller里的logout方法贴出来 @RequestMapping("logout") public void logout(HttpSession session) { //清楚session相关记录 session.removeAttribute("admin"); session.removeAttribute(com.common.util.SessionListener.LISTENER_NAME); } 3、进行cas服务器配置文件的修改 cas\WEB-INF\cas

Calling logout function of facebook ios sdk is not clearing user Credentials

℡╲_俬逩灬. 提交于 2019-11-28 12:38:05
While implementing facebook SSO, calling logout function of facebook ios sdk is not clearing user Credentials and it does not ask to login next time. iProgrammer I Used Graph Api..... - (IBAction)loginButtonPressed:(id)sender { NSString *client_id = @"dsfgdgfgfgdfgvdfg"; //alloc and initalize our FbGraph instance self.fbGraph = [[FbGraph alloc] initWithFbClientID:client_id]; //begin the authentication process..... [fbGraph authenticateUserWithCallbackObject:self andSelector:@selector(fbGraphCallback:) andExtendedPermissions:@"user_photos,user_videos,publish_stream,offline_access,user_checkins

Delete facebook session cookie from my application on users logout

烂漫一生 提交于 2019-11-28 12:31:59
I am working in an application which is using facebook connect to log in the users using their facebook account. Everything works fine except in the following case: User logged out from my website and facebook. User try to login again in my app. In this case when the facebook connect popup opens in says "error in the application". I found that the reason is that the old fbs cookie is not being removed on users logout. I have added the code to delete the cookie on logout of my app but the cookie isn't deleted. Here is my code (using Symfony framework.) $fbCookie = 'fbs_'.sfConfig::get('app

why is php generating the same session ids everytime in test environment (WAMP)?

泄露秘密 提交于 2019-11-28 11:39:52
i've configured wamp in my system, and am doing the development cum testing in this local environment. i was working on the logout functionality, and happened to notice that the session ids being generated are same within the browser. Eg - chrome always generates session id = abc, for all users even after logging out and logging in; IE always generates session id = xyz, for all users. Is this an issue with wamp/ my test environment? please find below my logout php script - <?php session_start(); $sessionid = session_id(); echo $sessionid; session_unset(); session_destroy(); ?> You probably

Log user out in Symfony 2 application when “remember me” is enabled

谁说我不能喝 提交于 2019-11-28 10:11:40
I'm looking for a way to log user out of Symfony 2 application, but could not find a way to do it properly. I've tried an approach described here: Symfony2: how to log user out manually in controller? $this->get('security.context')->setToken(null); $this->get('request')->getSession()->invalidate(); It's working fine when " remember me " is disabled, however, when I enable it, it's not working. It looks like user is automatically re-authenticated back again by this cookie. remember_me: key: "%secret%" lifetime: 31536000 path: / domain: ~ always_remember_me: true What is the proper way to log

https://appengine.google.com/_ah/logout still working?

巧了我就是萌 提交于 2019-11-28 09:14:31
问题 Until a few days ago I could use the log out from google account procedure mentioned (among several others) in this link. The recommended log out URL is similar to: https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=http://localhost:4200/index.html But all of a sudden when navigating to the recommended URL, a redirection notice page appears instead of navigating directly to http://localhost:4200/index.html In this previous question a similar

Instagram Api User Logout

淺唱寂寞╮ 提交于 2019-11-28 08:36:35
How do I perform a logout from my application only (not from the instagram account - but yes from my app) ? I saw some people saying "refer the user to the instagram logout page" but it's not what I really need. You could use an iframe in your own "logout" page. Something like: <iframe src="https://instagram.com/accounts/logout/" width="0" height="0" /> You probably want to redirect to the main page after the log out is performed. Hope that helped. If you are using PHP/HTML I would put a hidden IMG element with the SRC attribute pointed at the Instagram logout URL. If Bhavik S's answer didn't

Cannot Logout of Facebook with Facebook C# SDK

一笑奈何 提交于 2019-11-28 08:22:09
问题 I think I've read just about everything out there on the topic of logging out of Facebook inside of a Desktop application. Nothing so far works. Specifically, I would like to log the user out so that they can switch identities, e.g. People sharing a computer at home could then use the software with their own Facebook accounts, but with no chance to switch accounts, it's quite messy. (Have not yet tested switching Windows users accounts as that is simply far too much to ask of the end user and

'Login as another user' MVC 4 Windows Authentication

旧街凉风 提交于 2019-11-28 05:32:56
I have an intranet project written in MVC 4 which uses Windows Authentication to authorise and authenticate users. I need to add a 'Login as another user' functionality. After some searching I found this solution which suggests returning a 401, and created the following Action (which is called using a form): // // POST: /Home/LogOut [HttpPost] [ValidateAntiForgeryToken] public ActionResult LogOut() { return new HttpUnauthorizedResult(); } The Action gets called, and the browser pops up a username and password window, however as the result redirects back to the Action, a 401 is always returned.