-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds logout feature. Users must now input a 9 digit SSO number.
- Loading branch information
Brianna
authored and
Brianna
committed
Apr 14, 2017
1 parent
c4ec0a7
commit 6ccd07a
Showing
5 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<%@ page import = "database.*,entities.User,utilities.Mail" %> | ||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> | ||
<% | ||
Cookie[] usercookies = request.getCookies(); | ||
if(usercookies != null){ | ||
request.getSession(); | ||
session.removeAttribute("ssoNum"); | ||
session.invalidate(); | ||
for(Cookie c : usercookies){ | ||
if(c.getName().equals("ssoNum")){ | ||
//delete cookies | ||
c.setValue(""); | ||
c.setMaxAge(0); | ||
response.addCookie(c); | ||
} | ||
} | ||
response.sendRedirect("../../logout.jsp"); | ||
} | ||
%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<%@ page import = "database.*,entities.User,utilities.Mail" %> | ||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> | ||
<% | ||
Cookie[] usercookies = request.getCookies(); | ||
if(usercookies != null){ | ||
request.getSession(); | ||
session.removeAttribute("ssoNum"); | ||
session.invalidate(); | ||
for(Cookie c : usercookies){ | ||
if(c.getName().equals("ssoNum")){ | ||
//delete cookies | ||
c.setValue(""); | ||
c.setMaxAge(0); | ||
response.addCookie(c); | ||
} | ||
} | ||
response.sendRedirect("index.jsp"); | ||
} | ||
%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters