logout

spring-security 3.0.X, 让ajax login和普通login共存

◇◆丶佛笑我妖孽 提交于 2019-12-02 22:38:17
使用spring security时遇到一个问题,有大量的ajax post是需要登录控制的,但是默认的spring-security机制导致post结果返回的是登录页。 现在要解决几个问题: 1,ajax post如果需要登录的话,返回需要登录的json消息,前端可以继续处理 2,新建一套ajax login的页面流转,但是不能和原有的login过程冲突,因为其他的非ajax请求还是需要用正常的login。 spring security配置如下: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:security="http://www.springframework.org/schema/security" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework

Auto Logout when user leaves the application without doing logout action

*爱你&永不变心* 提交于 2019-12-02 21:28:16
问题 Sometimes , an user leave an application without clicking on logout button, or do shutting down or hibernating of its Machine, pr even close all sessions (pages) which related to the application domain. So the server cannot knows that the user has been logged out!. If our case, we have a "time spent on last session" parameter to check the time of last session activated for each user. We need to auto Logout user when he leaves the application without doing logout action! Any process to do?

How to unset a specific php session on logout

ぃ、小莉子 提交于 2019-12-02 20:57:05
I have 2 sites. In one site this is true: session_is_registered('site1sess') and in the other one this is true: session_is_registered('site2sess') Those are the session names I give users on login. My problem is that when I logout from one site, I also logout in the other one because I use: session_destroy(); What is the best way to logout from site1 or 2 deleting all the session variables from it? Thank you. Use unset() for all the session variables specific to either site 1 or 2. unset($_SESSION['site1']); //or unset($_SESSION['site2']); Just so that you know, session_is_registered is

How to route without a templateUrl?

萝らか妹 提交于 2019-12-02 20:08:29
Ok. I have a url setup to log a user out. On the server, there is no html. The session on the server simply gets destroyed, and then the user is redirected to an address. This works fine with plain html, but with Angular i am having issues. I've been routing all main routes using $routeProvider.when('/foo', {templateUrl: '/foo.html', controller: 'Ctrl'}) and that works fine for normal templated routes.. however, if there is no template it will not work. So, how do i support the route /logout in the same fashion as above, when there is no html template? Lukas A workaround is to use template

Logout button php

时光总嘲笑我的痴心妄想 提交于 2019-12-02 18:36:45
I have this code and need the code to add a logout button, can anyone write out the code for a log out button that will log out the user, I read something about destroy session but do not know how to write the code out, thank you! <?php include 'connection.php'; //start of checking if user is logged in code if (!valid_credentials) { header('Location: login.php'); exit(); } $_SESSION['user'] = 'username'; if (!isset($_SESSION['user'])) { header('Location: login.php'); exit(); } //end of logged in code and starting a session $query = "SELECT * FROM people"; $result = mysql_query($query); While(

WSO2 IS Single Logout partially working

筅森魡賤 提交于 2019-12-02 14:13:20
问题 I am testing SAML SSO using WSO2 Identity Server 5.0.0 with two PHP application instances as service providers (using onelogin phpsaml). I managed to make the single sign on to work but now I'm facing a problem with single logout. When I trigger a logout request from the PHPApp1, WSO2 IDP responds with a logout response and it seems to works fine; WSO2 IDP triggers a logout request to the saml session particants, in this case to the PHPApp2; The PHPApp2 handles the logout request and redirect

phpmyadmin logs out after 1440 secs

有些话、适合烂在心里 提交于 2019-12-02 14:07:27
In my local development Ubuntu box I use MySQL and phpmyadmin to work with the database. Whenever phpmyadmin is idle for 1440 secs (24min) the session expires. I lose my place and have to login and start over. I tried changing the $cfg['LoginCookieValidity'] = 3600 * 9; inside config.inc.php but it still times out in 1440 seconds. I have restarted everything and cleared the browser cache (Firefox history -> Clear recent history -> Cache -> Everything). I'm not sure why the increased timeout does not take effect. What am I doing wrong? Pavnish Yadav Go to PHPMyAdmin in your browser Settings >

Login, logout and duration time in php and mysql?

与世无争的帅哥 提交于 2019-12-02 10:27:42
I would like to store the login, logout and duration time in database. The login time is created when the user is authenticated(successfully logged in) The logout time is created when the user clicks the logout button The duration is logout - login time. (logout minus login) But the problem is, what if the user didnt click the logout button. Here are the situations: Internet loss Close the browser/tab. (I need this must use javascript, but i donnu how to do it, any idea?) EDIT: I forgot to add something to the question, the program is a full flash program, there is no navigation to other page.

WSO2 IS Single Logout partially working

夙愿已清 提交于 2019-12-02 07:20:43
I am testing SAML SSO using WSO2 Identity Server 5.0.0 with two PHP application instances as service providers (using onelogin phpsaml). I managed to make the single sign on to work but now I'm facing a problem with single logout. When I trigger a logout request from the PHPApp1, WSO2 IDP responds with a logout response and it seems to works fine; WSO2 IDP triggers a logout request to the saml session particants, in this case to the PHPApp2; The PHPApp2 handles the logout request and redirect to the WSO2 IDP logout url with the LogoutResponse; And now the issue: WSO2 does not seems to handle

Sessions get messed up on external host

旧城冷巷雨未停 提交于 2019-12-02 03:58:59
The problem sounds like this: The log-in using sessions works perfect on my localhost, but when the EXACTLY same files are uploaded to my host (hostgator), the sessions don't or, or they get messed up. Also the log-out feature doesn't work on the host. I've checked and every page has the session_start(); inside it. The session is not destroyed, even if my logout.php looks like this: <?php session_start(); $_SESSION = array(); session_unset(); session_destroy(); header("location:index.php"); exit(); ?> Any suggestions? I noticed on Firefox with Firebug that your pages are all cached . Your