talasila | 4ad39a5 | 2017-02-07 15:03:57 -0500 | [diff] [blame^] | 1 | <%-- |
| 2 | ================================================================================ |
| 3 | eCOMP Portal |
| 4 | ================================================================================ |
| 5 | Copyright (C) 2017 AT&T Intellectual Property |
| 6 | ================================================================================ |
| 7 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | you may not use this file except in compliance with the License. |
| 9 | You may obtain a copy of the License at |
| 10 | |
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | Unless required by applicable law or agreed to in writing, software |
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | See the License for the specific language governing permissions and |
| 17 | limitations under the License. |
| 18 | ================================================================================ |
| 19 | --%> |
| 20 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> |
| 21 | <%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %> |
| 22 | <%@ taglib prefix="o" tagdir="/WEB-INF/tags"%> |
| 23 | <%@ page session="false" %> |
| 24 | <o:header title="Home"/> |
| 25 | <o:topbar pageName="Home"/> |
| 26 | <div class="container-fluid main"> |
| 27 | <div class="row-fluid"> |
| 28 | <div class="span10 offset1"> |
| 29 | |
| 30 | <h1> |
| 31 | Hello world! |
| 32 | </h1> |
| 33 | |
| 34 | <div> |
| 35 | <p class="well"> |
| 36 | <security:authorize access="hasRole('ROLE_USER')"> |
| 37 | <b><span class="text-success">You are currently logged in.</span></b> |
| 38 | </security:authorize> |
| 39 | <security:authorize access="!hasRole('ROLE_USER')"> |
| 40 | <b><span class="text-error">You are <em>NOT</em> currently logged in.</span></b> |
| 41 | </security:authorize> |
| 42 | </p> |
| 43 | |
| 44 | <p>This example application is configured with several pages requiring different levels of access. |
| 45 | This page does not require the user to be logged in. Use the tabs in the navbar above to navigate to |
| 46 | pages with different access requirements. |
| 47 | </p> |
| 48 | |
| 49 | <ul> |
| 50 | <li><a href="user">User</a>, requires the user to be logged in with the <code>ROLE_USER</code> Spring Security authority.</li> |
| 51 | <li><a href="admin">Admin</a>, requires the user to be logged in with the <code>ROLE_ADMIN</code> Spring Security authority. |
| 52 | See below for the currently configured list of admin accounts.</li> |
| 53 | <security:authorize access="hasRole('ROLE_USER')"> |
| 54 | <li><a href="j_spring_security_logout">Logout</a>, log out directly and return to this page.</li> |
| 55 | </security:authorize> |
| 56 | <security:authorize access="!hasRole('ROLE_USER')"> |
| 57 | <li><a href="login">Log in</a>, log in directly and return to this page.</li> |
| 58 | </security:authorize> |
| 59 | </ul> |
| 60 | |
| 61 | |
| 62 | </div> |
| 63 | |
| 64 | <div> |
| 65 | <h3>Client Filter Configuration</h3> |
| 66 | |
| 67 | <p>This authorization filter for this client has been configured with the following components:</p> |
| 68 | |
| 69 | <ul> |
| 70 | <li>Issuer service: <code>${ issuerServiceClass }</code></li> |
| 71 | <li>Server configuration service: <code>${ serverConfigurationServiceClass }</code></li> |
| 72 | <li>Client configuration service: <code>${ clientConfigurationServiceClass }</code></li> |
| 73 | <li>Auth request options service: <code>${ authRequestOptionsServiceClass }</code></li> |
| 74 | <li>Auth request URI builder: <code>${ authRequestUriBuilderClass }</code></li> |
| 75 | </ul> |
| 76 | </div> |
| 77 | |
| 78 | <div> |
| 79 | <h3>Administrators</h3> |
| 80 | |
| 81 | <p>Logged in users are assigned the <code>ROLE_USER</code> authority by default, but the following users |
| 82 | (identified by issuer/subject pairs) will also be given <code>ROLE_ADMIN</code>:</p> |
| 83 | |
| 84 | <table class="table table-striped table-hover span4"> |
| 85 | <tr> |
| 86 | <th>Issuer</th> |
| 87 | <th>Subject</th> |
| 88 | </tr> |
| 89 | <c:forEach items="${ admins }" var="admin"> |
| 90 | <tr> |
| 91 | <td>${ admin.issuer }</td> |
| 92 | <td>${ admin.subject }</td> |
| 93 | </tr> |
| 94 | </c:forEach> |
| 95 | </table> |
| 96 | </div> |
| 97 | </div> |
| 98 | </div> |
| 99 | </div> |
| 100 | |
| 101 | |
| 102 | <o:footer /> |