oauth2-client-demo/site/index.html

41 lines
1.5 KiB
HTML
Raw Normal View History

2018-02-08 16:11:19 +00:00
<html>
<head>
<title>Authorize an App</title>
2018-02-08 16:38:15 +00:00
<link rel="stylesheet" href="brutalist.css" />
2018-04-16 14:09:37 +00:00
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="./infos.js"></script>
<script>
var displayAuthUrl=oauthServerUrl + "?\n\t"
+ "response_type=" + encodeURIComponent(response_type) + "\n\t"
+ "&client_id=" + encodeURIComponent(client_id) + "\n\t"
+ "&redirect_uri=" + encodeURIComponent(redirect_uri) + "\n\t"
+ "&scope=" + encodeURIComponent(scope) + "\n\t"
+ "&state=" + encodeURIComponent(state);
var authUrl=displayAuthUrl.replace("\n","");
</script>
2018-02-08 16:11:19 +00:00
</head>
<body>
2018-02-13 17:24:01 +00:00
<h1>OAuth2 Client Demo App</h1>
<p>The only thing needed to ask an user to grants the Yolo app
access to Visibility is just putting a simple link:</p>
<p>Here the button is a link to:</p>
2018-04-16 14:09:37 +00:00
<pre id="displayUrlPre"></pre>
2018-02-13 17:24:01 +00:00
2018-04-16 14:09:37 +00:00
<a id="authURLLink" href="#">click Here</a>
to authorize me with the <strong>scopes</strong>:
2018-02-13 17:24:01 +00:00
2018-04-16 14:09:37 +00:00
<ul id="scopes"></ul>
<script>
$.when( $.ready ).then(function () {
$("#displayUrlPre").html(displayAuthUrl);
$("#authURLLink").attr("href",displayAuthUrl);
$.each(scopes,function(i,scope){
$("#scopes").append("<li>"+scope+"</li>\n");
})
});
</script>
2018-02-08 16:11:19 +00:00
</body>
</html>