pidgin/old.pidgin.im

Parents addf53a24e74
Children 2709b64ce0ed
Add a simple static page for making it easier on users for implicit oauth flows
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/htdocs/oauth.html Thu May 04 00:26:32 2017 -0500
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>libpurple oauth helper</title>
+
+ <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
+
+ <style>body { margin-top: 1em; }</style>
+ </head>
+ <body>
+ <div class="container">
+ <div class="col-sm-8 col-sm-offset-2">
+ <div class="row">
+ <img src="/shared/img/pidgin-circular.png" class="img-responsive center-block">
+ </div>
+
+ <div class="row">
+ <div class="panel panel-info">
+ <div class="panel-heading">About</div>
+ <div class="panel-body">
+ This page helps you to login your accounts that require oauth authentication. Due to the way OAuth2's implicit flow works, we do not have access to, nor do we store, this access token.
+ </div>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="panel panel-success">
+ <div class="panel-heading">Usage</div>
+ <div class="panel-body">
+ To use this page, click the copy button next to the access token and paste it into the password entry for the pidgin account you just enabled.
+ </div>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="alert alert-warning" role="alert"><strong>Warning!</strong> This access code is used to access your account. Do not share it with anyone!</div>
+ </div>
+
+ <div class="row">
+ <div class="input-group">
+ <input type="text" class="form-control" id="access_token">
+ <span class="input-group-btn">
+ <button type="button" class="btn btn-default" aria-label="Copy to clipboard" onclick="copyToClipboard();">
+ <span class="glyphicon glyphicon-copy" aria-hidden="true"></span>
+ </button>
+ </span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+ <script type="text/javascript">
+(function(){
+ // set the input box's value to the value of access_token in window.location.hash
+ var data = window.location.hash.slice(1);
+ var vars = data.split("&");
+ for (var i = 0; i < vars.length; i++) {
+ var parts = vars[i].split("=");
+ if(parts[0] == "access_token") {
+ var element = document.getElementById("access_token");
+ element.value = parts[1];
+ element.select();
+ break;
+ }
+ }
+})();
+
+function copyToClipboard(e) {
+ document.getElementById("access_token").select();
+ document.execCommand("copy");
+}
+ </script>
+</html>
Binary file htdocs/shared/img/pidgin-circular.png has changed