blob: 8b03cbded8dff36cd4bdde0697ab0a0490665c87 [file] [log] [blame]
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You 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
~
~ http://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.
-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Login integration example</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>
<script src="javascript/login-example.js"></script>
</head>
<body>
<div class="container">
<h1>Login integration example</h1>
<p>This is a small example of integrating Apache Unomi with an event login in order to merge profile based on emails
as merge keys (see associated rule file in src/main/resources/META-INF/cxs/rules/exampleLogin.json).</p>
<p>Important: note that login events should normally always be sent from the server performing the login, not through
Javascript for security reasons. Here we provide this type of example only for brievety and clarity.</p>
<div id="alert_placeholder"></div>
<form id="loginForm">
<div class="form-group">
<label for="firstname">First name</label>
<input type="text" name="firstName" id="firstname" class="form-control"
placeholder="Enter your first name here"/>
</div>
<div class="form-group">
<label for="lastname">Last name</label>
<input type="text" name="lastName" id="lastname" class="form-control"
placeholder="Enter your last name here"/>
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="text" name="email" id="email" class="form-control" placeholder="Enter your email here"
>
</div>
<div class="form-group">
<label for="email">Password</label>
<input type="password" name="password" id="password" class="form-control"
placeholder="Enter your password here">
</div>
<button id="loginButton" type="submit" class="btn btn-default">Login</button>
</form>
</div>
</body>
</html>