move demo files to ./demo

This commit is contained in:
AJ ONeal 2015-11-03 00:24:16 -08:00
parent ef5fa1a27b
commit d0554d9cd8
26 changed files with 112 additions and 112 deletions

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,4 +1,4 @@
// forgive the suckiness, but whatever // This is crap demo code. Forgive me.
(function (exports) { (function (exports) {
'use strict'; 'use strict';
@ -44,7 +44,7 @@ function generate(ke) {
$('.js-otpauth').innerHTML = otpauth; // only safe to inject because I created it $('.js-otpauth').innerHTML = otpauth; // only safe to inject because I created it
$('img.js-qrcode').src = src; $('img.js-qrcode').src = src;
$('.js-otp-iframe').src = 'phone.html?otpuri=' + encodeURIComponent(otpauth); $('.js-otp-iframe').src = 'demo/phone.html?otpuri=' + encodeURIComponent(otpauth);
Authenticator.generateToken(key).then(function (token) { Authenticator.generateToken(key).then(function (token) {
console.log('token', token); console.log('token', token);

View File

Before

Width:  |  Height:  |  Size: 274 KiB

After

Width:  |  Height:  |  Size: 274 KiB

View File

@ -41,7 +41,7 @@
<script src="bower_components/botp/index.js"></script> <script src="bower_components/botp/index.js"></script>
<!-- Authenticator --> <!-- Authenticator -->
<script src="authenticator.js"></script> <script src="../authenticator.js"></script>
<script src="jquery-2.0.0.min.js" type="text/javascript"></script> <script src="jquery-2.0.0.min.js" type="text/javascript"></script>
<script src="jquery.countdown.js" type="text/javascript"></script> <script src="jquery.countdown.js" type="text/javascript"></script>

View File

@ -1 +1 @@
See test.html / test.js and phone.html / phone.js See index.html / demo/demo.js and demo/phone.html / demo/phone.js

View File

@ -1,8 +1,110 @@
<!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="refresh" content="0;https://daplie.github.io/browser-authenticator/test.html"> <title>Authenticator - Daplie, Inc</title>
<meta charset="UTF-8">
<!--meta name="viewport" content="width=device-width, user-scalable=no" /-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src 'self' https://camo.githubusercontent.com/ https://chart.googleapis.com/ data:; child-src 'self'; object-src 'none'">
<link rel="stylesheet" type="text/css" href="demo/bootstrap-v3.3.5.min.css">
<link rel="stylesheet" type="text/css" href="demo/style.css">
</head> </head>
</body> <body class="fade">
Redirecting... <div class="container-fluid">
<div class="row">
<div class="col-xs-6 left">
<h1 class="authenticator">Authenticator Test</h1>
<img alt="qrcode" class="js-qrcode qrcode" width="166" height="166" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" />
<div class="scan">
Scan with <a href="https://www.authy.com/personal/mobile/" target="_blank">Authy App</a>
</div>
<div class="verify">
<label class="token-label">Enter Verification Token:</label>
<br />
<input class="js-token token-input" type="text" placeholder="i.e. 123 456" />
<button class="js-verify btn">Verify</button>
</div>
</div>
<div class="col-xs-6 right">
<img class="iPhone" src="demo/iPhoneMockup.png" />
<div class="iframe-container">
<iframe class="js-otp-iframe iframe" src="demo/phone.html"></iframe>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6 bottom">
<form class="form-horizontal">
<h1 class="console"> Console </h1>
<hr />
<div class="form-group">
<label class="col-sm-3 control-label">Issuer:</label>
<div class="col-sm-9">
<input type="text" class="js-company-name issuer-input wide" placeholder="Company Name">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Account:</label>
<div class="col-sm-9">
<input type="text" class="js-user-account issuer-input wide" placeholder="User Account">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Key:</label>
<div class="col-sm-9">
<input type="text" class="js-key base-key-input wide">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-6 col-xs-6">
<button type="button" class="btn btn-default js-generate regenerate">Regenerate</button>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">URI:</label>
<div class="col-sm-9">
<p class="js-otpauth">otpauth://totp/company:user?secret=xxxx&amp;issuer=company</p>
</div>
</div>
</form>
</div>
<div class="col-md-3"></div>
</div>
</div>
<!-- github banner -->
<a href="https://github.com/Daplie/browser-authenticator"><img class="github-banner" src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
<!-- extremely lightweight shim for hex conversion -->
<script src="demo/bower_components/unibabel/index.js"></script>
<script src="demo/bower_components/unibabel/unibabel.hex.js"></script>
<!-- base32 conversion (and binary string for forge) (works standalone from the above) -->
<script src="demo/bower_components/unibabel/unibabel.base32.js"></script>
<!-- forge.hmac -->
<script src="demo/bower_components/forge/js/util.js"></script>
<script src="demo/bower_components/forge/js/sha1.js"></script>
<script src="demo/bower_components/forge/js/hmac.js"></script>
<!-- forge.random.getBytes -->
<script src="demo/bower_components/forge/js/sha256.js"></script>
<script src="demo/bower_components/forge/js/cipher.js"></script>
<script src="demo/bower_components/forge/js/cipherModes.js"></script>
<script src="demo/bower_components/forge/js/aes.js"></script>
<script src="demo/bower_components/forge/js/prng.js"></script>
<script src="demo/bower_components/forge/js/random.js"></script>
<!-- botp.totp -->
<script src="demo/bower_components/botp/sha1-hmac.js"></script>
<script src="demo/bower_components/botp/index.js"></script>
<!-- Authenticator -->
<script src="authenticator.js"></script>
<script src="demo/demo.js"></script>
</body> </body>
</html> </html>

108
test.html
View File

@ -1,110 +1,8 @@
<!DOCTYPE html>
<html> <html>
<head> <head>
<title>Authenticator - Daplie, Inc</title> <meta http-equiv="refresh" content="0;https://daplie.github.io/browser-authenticator/">
<meta charset="UTF-8">
<!--meta name="viewport" content="width=device-width, user-scalable=no" /-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src 'self' https://camo.githubusercontent.com/ https://chart.googleapis.com/ data:; child-src 'self'; object-src 'none'">
<link rel="stylesheet" type="text/css" href="bootstrap-v3.3.5.min.css">
<link rel="stylesheet" type="text/css" href="style.css">
</head> </head>
<body class="fade"> </body>
<div class="container-fluid"> Redirecting...
<div class="row">
<div class="col-xs-6 left">
<h1 class="authenticator">Authenticator Test</h1>
<img alt="qrcode" class="js-qrcode qrcode" width="166" height="166" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" />
<div class="scan">
Scan with <a href="https://www.authy.com/personal/mobile/" target="_blank">Authy App</a>
</div>
<div class="verify">
<label class="token-label">Enter Verification Token:</label>
<br />
<input class="js-token token-input" type="text" placeholder="i.e. 123 456" />
<button class="js-verify btn">Verify</button>
</div>
</div>
<div class="col-xs-6 right">
<img class="iPhone" src="iPhoneMockup.png" />
<div class="iframe-container">
<iframe class="js-otp-iframe iframe" src="phone.html"></iframe>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6 bottom">
<form class="form-horizontal">
<h1 class="console"> Console </h1>
<hr />
<div class="form-group">
<label class="col-sm-3 control-label">Issuer:</label>
<div class="col-sm-9">
<input type="text" class="js-company-name issuer-input wide" placeholder="Company Name">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Account:</label>
<div class="col-sm-9">
<input type="text" class="js-user-account issuer-input wide" placeholder="User Account">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Key:</label>
<div class="col-sm-9">
<input type="text" class="js-key base-key-input wide">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-6 col-xs-6">
<button type="button" class="btn btn-default js-generate regenerate">Regenerate</button>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">URI:</label>
<div class="col-sm-9">
<p class="js-otpauth">otpauth://totp/company:user?secret=xxxx&amp;issuer=company</p>
</div>
</div>
</form>
</div>
<div class="col-md-3"></div>
</div>
</div>
<!-- github banner -->
<a href="https://github.com/Daplie/browser-authenticator"><img class="github-banner" src="https://camo.githubusercontent.com/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
<!-- extremely lightweight shim for hex conversion -->
<script src="bower_components/unibabel/index.js"></script>
<script src="bower_components/unibabel/unibabel.hex.js"></script>
<!-- base32 conversion (and binary string for forge) (works standalone from the above) -->
<script src="bower_components/unibabel/unibabel.base32.js"></script>
<!-- forge.hmac -->
<script src="bower_components/forge/js/util.js"></script>
<script src="bower_components/forge/js/sha1.js"></script>
<script src="bower_components/forge/js/hmac.js"></script>
<!-- forge.random.getBytes -->
<script src="bower_components/forge/js/sha256.js"></script>
<script src="bower_components/forge/js/cipher.js"></script>
<script src="bower_components/forge/js/cipherModes.js"></script>
<script src="bower_components/forge/js/aes.js"></script>
<script src="bower_components/forge/js/prng.js"></script>
<script src="bower_components/forge/js/random.js"></script>
<!-- botp.totp -->
<script src="bower_components/botp/sha1-hmac.js"></script>
<script src="bower_components/botp/index.js"></script>
<!-- Authenticator -->
<script src="authenticator.js"></script>
<script src="test.js"></script>
</body> </body>
</html> </html>