123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <!--
- ~ Copyright 2002-2021 the original author or authors.
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ https://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
- <!doctype html>
- <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org" xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
- <head>
- <title>Spring Security - SAML 2.0 Login & Logout</title>
- <meta charset="utf-8" />
- <style>
- span, dt {
- font-weight: bold;
- }
- </style>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
- </head>
- <body>
- <div class="container">
- <ul class="nav">
- <li class="nav-item">
- <form th:action="@{/logout}" method="post">
- <button class="btn btn-primary" id="rp_logout_button" type="submit">
- RP-initiated Logout
- </button>
- </form>
- </li>
- <li class="nav-item">
- <a id="ap_logout_button" class="nav-link" href="https://simplesaml-for-spring-saml.apps.pcfone.io/saml2/idp/SingleLogoutService.php?ReturnTo=http://localhost:8080/login?logout">
- AP-initiated Logout
- </a>
- </li>
- </ul>
- </div>
- <main role="main" class="container">
- <h1 class="mt-5">SAML 2.0 Login & Single Logout with Spring Security</h1>
- <p class="lead">You are successfully logged in as <span sec:authentication="name"></span></p>
- <p class="lead">You're email address is <span th:text="${emailAddress}"></span></p>
- <h2 class="mt-2">All Your Attributes</h2>
- <dl th:each="userAttribute : ${userAttributes}">
- <dt th:text="${userAttribute.key}"></dt>
- <dd th:text="${userAttribute.value}"></dd>
- </dl>
- <h6>Visit the <a href="https://docs.spring.io/spring-security/site/docs/current/reference/html5/#servlet-saml2" target="_blank">SAML 2.0 Login & Logout</a> documentation for more details.</h6>
- </main>
- </div>
- </body>
- </html>
|