SHARE
TWEET

Untitled

a guest Sep 11th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!doctype html>
  2. <html
  3.     lang="en"
  4.     xmlns:th="http://www.thymeleaf.org"
  5.     xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  6.     xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
  7.     layout:decorate="~{layout}"
  8.     >
  9.     <head>
  10.         <title>My Page</title>
  11.         <script th:inline="javascript" type="text/javascript">
  12.  
  13.             // detect if safari mobile
  14.             function isMobileSafari() {
  15.                 return navigator.userAgent.match(/(iPod|iPhone|iPad)/) && navigator.userAgent.match(/AppleWebKit/);
  16.             }
  17.             //Launch the element in your app if it's already installed on the phone
  18.             function launchApp() {
  19.                 window.open("fb://profile/33138223345", "_self");
  20.             }
  21.             var springAttribute = /*[[${username}]]*/ 'defaultanyvalue';
  22.             alert(springAttribute);
  23.             if (isMobileSafari()) {
  24.                 // 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
  25.                 launchApp();
  26.             } else {
  27.                 window.location =  "https://apps.apple.com/it/app/facebook/id284882215";
  28.             }
  29.  
  30.         </script>
  31.     </head>
  32.  
  33.     <body>
  34.         <!-- Content starts -->
  35.         <section class="my-3 p-3 bg-white rounded box-shadow" layout:fragment="content">
  36.             <div class="alert alert-success" role="alert">
  37.                 <small><strong>Well done!</strong> Aww yeah, you successfullying logged in.<br/>
  38.                     Your SAML 2.0 authentication process works fine.</small>
  39.             </div>
  40.             <p><img class="img-fluid" th:src="@{/img/nyan-cat.png}" /></p>
  41.             <p>You are logged as <span class="badge badge-dark" th:text="${username}">null</span>.</p>
  42.             <small class="d-block text-right mt-3" id="sso-btn">
  43.                 <a th:href="@{/saml/logout}" class="btn btn-spring btn-sm">
  44.                     <i class="far fa-user-circle"></i> Global logout
  45.                 </a>
  46.                 <a th:href="@{/saml/logout?local=true}" class="btn btn-spring btn-sm">
  47.                     <i class="fas fa-sign-out-alt"></i> Local logout
  48.                 </a>
  49.             </small>
  50.         </section>
  51.         <!-- Content ends -->
  52.     </body>
  53.  
  54. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top