Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html
- lang="en"
- xmlns:th="http://www.thymeleaf.org"
- xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
- xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
- layout:decorate="~{layout}"
- >
- <head>
- <title>My Page</title>
- <script th:inline="javascript" type="text/javascript">
- // detect if safari mobile
- function isMobileSafari() {
- return navigator.userAgent.match(/(iPod|iPhone|iPad)/) && navigator.userAgent.match(/AppleWebKit/);
- }
- //Launch the element in your app if it's already installed on the phone
- function launchApp() {
- window.open("fb://profile/33138223345", "_self");
- }
- var springAttribute = /*[[${username}]]*/ 'defaultanyvalue';
- alert(springAttribute);
- if (isMobileSafari()) {
- // To avoid the "protocol not supported" alert, fail must open itunes store to dl the app, add a link to your app on the store
- launchApp();
- } else {
- window.location = "https://apps.apple.com/it/app/facebook/id284882215";
- }
- </script>
- </head>
- <body>
- <!-- Content starts -->
- <section class="my-3 p-3 bg-white rounded box-shadow" layout:fragment="content">
- <div class="alert alert-success" role="alert">
- <small><strong>Well done!</strong> Aww yeah, you successfullying logged in.<br/>
- Your SAML 2.0 authentication process works fine.</small>
- </div>
- <p><img class="img-fluid" th:src="@{/img/nyan-cat.png}" /></p>
- <p>You are logged as <span class="badge badge-dark" th:text="${username}">null</span>.</p>
- <small class="d-block text-right mt-3" id="sso-btn">
- <a th:href="@{/saml/logout}" class="btn btn-spring btn-sm">
- <i class="far fa-user-circle"></i> Global logout
- </a>
- <a th:href="@{/saml/logout?local=true}" class="btn btn-spring btn-sm">
- <i class="fas fa-sign-out-alt"></i> Local logout
- </a>
- </small>
- </section>
- <!-- Content ends -->
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement