Skip to content

Commit

Permalink
Update docs/index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
amdelamar committed Jun 17, 2017
1 parent 296ddd7 commit 3d93654
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,31 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="author" content="Austin Delamar">
<meta name="keywords" content="java,otp,totp,hotp,password,2fa,software,library">
<meta name="keywords" content="java,otp,totp,hotp,password,2fa,authentication,software,library">
<meta name="description" content="OTP (One Time Password) utility in Java. To enable two-factor authentication (2FA) using HMAC-based or Time-based algorithms." />
<meta name="robots" content="all">

<!-- Open Graph data -->
<meta property="og:url" content="https://austindelamar.com/jotp/">
<meta property="og:type" content="website">
<meta property="og:locale" content="en_US">
<meta property="og:title" content="Jotp">
<meta property="og:image" content="https://austindelamar.com/jotp/img/blue-mobile-200x200.png">
<meta property="og:description" content="OTP (One Time Password) utility in Java. To enable two-factor authentication (2FA) using HMAC-based or Time-based algorithms.">

<!-- Twitter Card data -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="https://austindelamar.com/jotp/">
<meta name="twitter:creator" content="Austin Delamar">
<meta name="twitter:creator" content="amdelamar">
<meta name="twitter:title" content="Jotp">
<meta name="twitter:description" content="OTP (One Time Password) utility in Java. To enable two-factor authentication (2FA) using HMAC-based or Time-based algorithms.">
<meta name="twitter:image" content="https://austindelamar.com/jotp/img/blue-mobile-200x200.png">

<!-- Schema.org markup for Google+ -->
<meta itemprop="name" content="Jotp">
<meta itemprop="description" content="OTP (One Time Password) utility in Java. To enable two-factor authentication (2FA) using HMAC-based or Time-based algorithms.">
<meta itemprop="image" content="https://austindelamar.com/jotp/img/blue-mobile-200x200.png">

<link rel="icon" type="image/x-icon" href="img/blue-mobile-32x32.png">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="highlight/default.css">
Expand Down Expand Up @@ -95,7 +102,7 @@ <h3>Usage</h3>

// Generate a Time-based OTP from the secret, using Unix-time
// rounded down to the nearest 30 seconds.
String code = OTP.create(secret, OTP.timeInHex(), 6, "totp");</code></pre>
String code = OTP.create(secret, OTP.timeInHex(), 6, Type.TOTP);</code></pre>
<p>
Show User QR Code<sup>1</sup><br>
Easiest way to do this is through Goolge APIs, but I plan to add a <code>generateImage()</code> function soon.</p>
Expand All @@ -107,6 +114,8 @@ <h3>Usage</h3>
<div class="seven columns">
<p><br><br>
<i>https://chart.googleapis.com/chart?chs=200x200&cht=qr&chl=200x200&chld=M|0&cht=qr&chl=otpauth://totp/Example:hello@example.com?secret=IM4ZL3G5Q66KW4U7PMOQVXQQH3NGOCHQ&issuer=Example&algorithm=SHA1&digits=6&period=30</i>
<br><br>
(You can use <code>OTP.getURL()</code> to get the <code>otpauth://</code> URL too.)
</p>
</div>
<div class="twelve columns">
Expand All @@ -115,7 +124,7 @@ <h3>Usage</h3>
String userEnteredCode = "123456";

// Verify OTP
if(OTP.verify(secret, userEnteredCode, 6, "totp")) {
if(OTP.verify(secret, userEnteredCode, 6, Type.TOTP)) {
// Code valid. Login successful.
}</code></pre>

Expand Down

0 comments on commit 3d93654

Please sign in to comment.