-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
37 lines (30 loc) · 942 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<title>OAuth 2.0 Example</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="https://rawgit.com/andreassolberg/jso/master/build/jso.js"></script>
</head>
<body>
<div id="info" style="display: none;"></div>
<script type="text/javascript">
$(document).ready(function() {
JSO.enablejQuery($);
var jso = new JSO({
providerID: "smartcitizen",
client_id: "d2a585d071c3c667aba2f7f77036414f396b9f3be278a93c0b8a5a7078c18e5a",
authorization: "https://id.smartcitizen.me/oauth/authorize",
redirect_uri: "http://example.smartcitizen.me"
});
jso.callback();
jso.ajax({
url: "https://new-api.smartcitizen.me/v0/me",
dataType: 'json',
success: function(data) {
$('#info').show().prepend(JSON.stringify(data));
}
});
});
</script>
</body>
</html>