index.jsp 2.75 KB
Newer Older
1 2 3
<%@ 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" %>
4
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
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
<!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>
30
	<a href="<s:url value="/" />">Unprotected base url</a><br />
31
	<a href="<s:url value="/protected/authenticated" var="protectedAuthenticated" />">Protected url: authentication required</a><br />
32
	<a href="<s:url value="/method/authenticated" />">Protected url: authentication required (method annotation)</a><br />
33 34 35 36
	<a href="<s:url value="/method/contributor" />">Protected url: CONTRIBUTOR role or higher required (method annotation)</a><br />
	<a href="<s:url value="/protected/contributor" />">Protected url: CONTRIBUTOR role or higher required (security config)</a><br />
	<a href="<s:url value="/protected/admin" />">Protected url: ADMINISTRATOR role required</a><br />
	<a href="<s:url value="/blocked/noaccess" />">Blocked url: no access allowed</a><br />
37 38 39 40 41
	
	<h2>SAML Metadata</h2>
	<a href="<s:url value="/saml/metadata" />">SAML Metadata - best option: configured file before generation</a><br />
	<a href="<s:url value="/saml/metadata/generate" />">SAML Metadata - generate based on configuration</a><br />
	<a href="<s:url value="/saml/metadata/filesystem" />">SAML Metadata - force load from filesystem (fails if not existing)</a><br />
42 43
	
	<h2>Login/Logout</h2>
44 45
	<a href="<s:url value="/logout" />">local logout</a><br />
	<a href="<s:url value="/centralLogout" />">central logout</a>
46
	<br />
47 48 49 50
	<a href="<s:url value="/login?url=${protectedAuthenticated}" />">Enter local login form</a> (with callbackUrl)<br />
	<a href="<s:url value="/filteredLogin?url=${protectedAuthenticated}" />">Enter filtered login</a> (with callbackUrl)<br />
	<a href="<s:url value="/loginClient?client_name=saml" />">Force SAML login</a> (even if already authenticated)<br />
	<a href="<s:url value="/loginClient?client_name=local" />">Force local login</a> (even if already authenticated)<br />
51 52 53
	<br /><br />
</body>
</html>