-
Notifications
You must be signed in to change notification settings - Fork 409
Expand file tree
/
Copy pathsls.jsp
More file actions
64 lines (60 loc) · 2 KB
/
sls.jsp
File metadata and controls
64 lines (60 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<%@page import="com.onelogin.saml2.Auth"%>
<%@page import="java.util.Collection"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Map"%>
<%@page import="java.io.StringWriter"%>
<%@page import="java.io.PrintWriter"%>
<%@page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>A Java SAML Toolkit</title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<h1>A Java SAML Toolkit</h1>
<b>Logout</b>
<%
Auth auth;
try
{
auth = new Auth(request, response);
auth.processSLO();
}
catch (Exception e)
{
e.printStackTrace();
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
String stackTrace = sw.toString().replace("\n", "<br/>");
out.println("<div class=\"alert alert-danger\" role=\"alert\">" + stackTrace + "</div>");
return;
}
List<String> errors = auth.getErrors();
if (errors.isEmpty()) {
out.println("<p>Sucessfully logged out</p>");
out.println("<a href=\"dologin.jsp\" class=\"btn btn-primary\">Login</a>");
} else {
out.println("<p>");
for(String error : errors) {
out.println(" " + error + ".");
}
out.println("</p>");
}
%>
</div>
</body>
</html>