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