index.jsp 1.89 KB
Newer Older
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
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE HTML>
<html>
<head>
    <title>DARIAHSP Boot Sample Application</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
	<h1>DARIAHSP Boot Sample Application</h1>
	<c:choose>
		<c:when test="${error!=null}">
			<span style="color: red;">
				<b>Error</b>: ${error}<br />
				<b>Message</b>: ${message}<br />
			</span><br />
		</c:when>
		<c:otherwise>
			<b>Served page</b>: ${requestedPage}<br />
			<b>Restrictions</b>: ${restrictions}<br /><br />
		</c:otherwise>
	</c:choose>
	<b>User</b>: ${_auth}<br />
	<b>SessionId</b>: ${_sessionId}<br /><br />
	<b>Local logins enabled</b>: ${localEnabled}<br />
	<b>SAML enabled</b>: ${samlEnabled}
	<h2>Pages</h2>
	<a href="/">Unprotected base url</a><br />
	<a href="/protected/authenticated">Protected url: authentication required</a><br />
	<a href="/method/contributor">Protected url: CONTRIBUTOR role or higher required (method annotation)</a><br />
	<a href="/protected/contributor">Protected url: CONTRIBUTOR role or higher required (security config)</a><br />
	<a href="/protected/admin">Protected url: ADMINISTRATOR role required</a><br />
	<a href="/blocked/noaccess">Blocked url: no access allowed</a><br />
	<br />
	
	<h2>Login/Logout</h2>
	<a href="/logout?url=/?forcepostlogouturl">logout</a><br />
	<a href="/logout?url=/?forcepostlogouturl">pac4j local logout</a><br />
	<a href="/centralLogout?url=/?forcepostlogouturlafteridp">pac4j central local logout</a>
	<br />
	<a href="/forceLogin?client_name=saml">Force SAML login</a> (even if already authenticated)<br />
	<a href="/forceLogin?client_name=local">Force local login</a> (even if already authenticated)<br />
	<br /><br />
</body>
</html>