blob: 8b8a98b0aec213a57c645bbb38b67573d37537f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<!doctype html>
<html>
<head>
<title>Single Sign-On Ajax demo</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<style>
.state {
display: none;
}
body.anonymous .state.anonymous,
body.authenticated .state.authenticated {
display: initial;
}
</style>
</head>
<body>
<div class="container">
<h1>Single Sign-On Ajax demo</h1>
<div id="error" class="alert alert-danger" style="display: none;"></div>
<form id="login-form" class="form-horizontal state anonymous">
<div class="form-group">
<label for="inputUsername" class="col-sm-2 control-label">Username</label>
<div class="col-sm-10">
<input type="text" name="username" class="form-control" id="inputUsername">
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="col-sm-2 control-label">Password</label>
<div class="col-sm-10">
<input type="password" name="password" class="form-control" id="inputPassword">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Login</button>
</div>
</div>
</form>
<div class="state authenticated">
<h3>Logged in</h3>
<dl id="user-info" class="dl-horizontal"></dl>
<a id="logout" class="btn btn-default">Logout</a>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="app.js"></script>
</body>
</html>
|