-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.html
140 lines (131 loc) · 6.55 KB
/
index.html
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="">
<title>Microsoft Authentication with MSAL.js</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" integrity="sha384-Smlep5jCw/wG7hdkwQ/Z5nLIefveQRIY9nfy6xoR1uRYBtpZgI6339F5dgvm/e9B"
crossorigin="anonymous">
<!-- Custom styles for this template -->
<link href="msidoneth.css" rel="stylesheet">
</head>
<body>
<main role="main">
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<div class="container">
<h1 class="display-3">Hello,
<span id="name">there</span>.
</h1>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="clientid_label">Client ID</span>
<span class="input-group-text" data-toggle="tooltip" data-placement="top" title="If you use a custom Client ID, you will need to add this website's url to the list of reply urls.">🛈</span>
</div>
<input type="text" class="form-control" aria-label="Default" aria-describedby="clientid_label" value="947846e9-bea5-403d-a8f4-aa30f54ee587"
id="clientid_input">
<div class="input-group-prepend">
<label class="input-group-text" for="authority_select">Authority</label>
</div>
<select class="custom-select" id="authority_select">
<option value="common" selected>/common</option>
<option value="organizations">/organizations</option>
</select>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="scopes_label">Scopes</span>
</div>
<input type="text" class="form-control" aria-label="Default" aria-describedby="scopes_label" value="https://graph.microsoft.com/user.read,https://graph.microsoft.com/user.readbasic.all"
id="scopes_input">
</div>
<p id="sign_in_text" class="token">Sign in with your Microsoft Account.</p>
<p>
<a class="btn btn-primary btn-lg" role="button" id="sign_in_button">Sign In »</a>
</p>
</div>
</div>
<div class="container">
<!-- Example row of columns -->
<div id="id_token_container" hidden>
<h2>ID Token</h2>
<hr>
<div class="row">
<div class="col-md-4">
<h3>Raw JWT</h3>
<p id="jwt_raw_id" class="token"></p>
</div>
<div class="col-md-8">
<h3>JWT Decoded Output</h3>
<div id="jwt_decoded_output_id">
<div id="message_id"></div>
<h4>Header</h4>
<div id="header_id" class="jwt token"></div>
<br />
<h4>Payload</h4>
<div id="payload_id" class="jwt token"></div>
<br />
<h4>Signature</h4>
<div id="signature_id" class="token"></div>
</div>
</div>
</div>
</div>
<br>
<br>
<div id="access_token_container" hidden>
<h2>Access Token</h2>
<hr>
<div class="row">
<div class="col-md-4">
<h3>Raw JWT</h3>
<p id="jwt_raw_access" class="token"></p>
</div>
<div class="col-md-8">
<h3>JWT Decoded Output</h3>
<div id="jwt_decoded_output_access">
<div id="message_access"></div>
<h4>Header</h4>
<div id="header_access" class="jwt token"></div>
<br />
<h4>Payload</h4>
<div id="payload_access" class="jwt token"></div>
<br />
<h4>Signature</h4>
<div id="signature_access" class="token"></div>
</div>
</div>
</div>
</div>
</div>
<!-- /container -->
</main>
<footer class="footer">
<div class="container text-center">
<span class="text-muted">Created by
<a href="https://shawntabrizi.com/">Shawn Tabrizi</a> - Source on
<a href="https://github.com/shawntabrizi/Microsoft-Authentication-with-MSAL.js">GitHub</a> -
<a href="https://shawntabrizi.com/aad/building-a-simple-sign-in-page-with-msal-js-for-microsoft-identities/">Blog Post</a> - Using
<a href="https://github.com/AzureAD/microsoft-authentication-library-for-js">MSAL.js</a>
</span>
</div>
</footer>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" integrity="sha384-o+RDsa0aLu++PJvFqy8fFScvbHFLtbvScb8AjopnFD+iEQ7wo/CG0xlczd+2O/em"
crossorigin="anonymous"></script>
<!-- Custom JS-->
<script src="js/msal.min.js"></script>
<script src="js/sign_in.js"></script>
<script src="js/jwt_decoder.js"></script>
</body>
</html>