index.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!--
  2. ~ Copyright 2002-2021 the original author or authors.
  3. ~
  4. ~ Licensed under the Apache License, Version 2.0 (the "License");
  5. ~ you may not use this file except in compliance with the License.
  6. ~ You may obtain a copy of the License at
  7. ~
  8. ~ https://www.apache.org/licenses/LICENSE-2.0
  9. ~
  10. ~ Unless required by applicable law or agreed to in writing, software
  11. ~ distributed under the License is distributed on an "AS IS" BASIS,
  12. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. ~ See the License for the specific language governing permissions and
  14. ~ limitations under the License.
  15. -->
  16. <!doctype html>
  17. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org" xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
  18. <head>
  19. <title>Spring Security - SAML 2.0 Login & Logout</title>
  20. <meta charset="utf-8" />
  21. <style>
  22. span, dt {
  23. font-weight: bold;
  24. }
  25. </style>
  26. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  27. </head>
  28. <body>
  29. <div class="container">
  30. <ul class="nav">
  31. <li class="nav-item">
  32. <form th:action="@{/logout}" method="post">
  33. <button class="btn btn-primary" id="rp_logout_button" type="submit">
  34. RP-initiated Logout
  35. </button>
  36. </form>
  37. </li>
  38. </ul>
  39. </div>
  40. <main role="main" class="container">
  41. <h1 class="mt-5">SAML 2.0 Login & Single Logout with Spring Security</h1>
  42. <p class="lead">You are successfully logged in as <span sec:authentication="name"></span></p>
  43. <p class="lead">You're email address is <span th:text="${emailAddress}"></span></p>
  44. <h2 class="mt-2">All Your Attributes</h2>
  45. <dl th:each="userAttribute : ${userAttributes}">
  46. <dt th:text="${userAttribute.key}"></dt>
  47. <dd th:text="${userAttribute.value}"></dd>
  48. </dl>
  49. <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>
  50. </main>
  51. </div>
  52. </body>
  53. </html>