Skip to content

Commit

Permalink
Merge pull request #1 from marcoschulte/master
Browse files Browse the repository at this point in the history
Fixed Javadoc compilation
  • Loading branch information
johnnymongiat authored Sep 23, 2016
2 parents fcf7197 + 34d47b4 commit d0f2267
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/**
* An immutable class representing an OTP Auth URI (as per the
* <a href="https://code.google.com/p/google-authenticator/wiki/KeyUriFormat">Google Authenticator URI format</a>):
* <pre>otpauth://{type}/{label}?secret={secret}&issuer={issuer}&digits={digits}&counter={counter}&period={period}</pre>
* <pre>otpauth://{type}/{label}?secret={secret}&amp;issuer={issuer}&amp;digits={digits}&amp;counter={counter}&amp;period={period}</pre>
* <ul>
* <li>{@code type}: The OTP type, either "hotp" or "totp".</li>
* <li>{@code label}: The label used to identify which account the underlying key is associated with.
Expand All @@ -32,7 +32,7 @@
* String issuer = "Acme Corporation";
* String label = issuer + ":Alice Smith";
* OTPAuthURI uri = OTPAuthURIBuilder.fromKey(new OTPKey(secret, OTPType.TOTP)).label(label).issuer(issuer).digits(6).timeStep(30000L).build();
* // Prints "otpauth://totp/Acme%20Corporation:Alice%20Smith?secret=GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ&issuer=Acme%20Corporation&digits=6&period=30"
* // Prints "otpauth://totp/Acme%20Corporation:Alice%20Smith?secret=GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ&amp;issuer=Acme%20Corporation&amp;digits=6&amp;period=30"
* System.out.println(uri.toUriString());
* </pre>
*/
Expand Down Expand Up @@ -241,7 +241,7 @@ public String toPlainTextUriString() {
* the individual components were themselves decoded/plain-text when this instance was built (this is a prerequisite).
* <p>
* The URI conforms to the following format:
* <pre>otpauth://{type}/{label}?secret={secret}&issuer={issuer}&digits={digits}&counter={counter}&period={period}</pre>
* <pre>otpauth://{type}/{label}?secret={secret}&amp;issuer={issuer}&amp;digits={digits}&amp;counter={counter}&amp;period={period}</pre>
* <ul>
* <li>{@code type}: The OTP type, either "hotp" or "totp".</li>
* <li>{@code label}: The label used to identify which account the underlying key is associated with.
Expand Down Expand Up @@ -311,7 +311,7 @@ private static final String safeEncodeLabel(String label) {
* <li>The unreserved characters ".", "-", "~", and "_" remain the same.
* <li>The additional "pchar" characters "@" and ":" remain the same.
* <li>The sub-delimiters "!", "$", "'", "(", ")", "*", ",", and ";" remain the same.
* ('+', '&' and '=' are excluded)
* ('+', '&amp;' and '=' are excluded)
* <li>The additional "query" characters "/", and "?" remain the same.
* <li>The space character " " is converted into %20.
* <li>All other characters are converted into one or more bytes using UTF-8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* String issuer = "Acme Corporation";
* String label = issuer + ":Alice Smith";
* OTPAuthURI uri = OTPAuthURIBuilder.fromKey(new OTPKey(secret, OTPType.TOTP)).label(label).issuer(issuer).digits(6).timeStep(30000L).build();
* // Prints "otpauth://totp/Acme%20Corporation:Alice%20Smith?secret=GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ&issuer=Acme%20Corporation&digits=6&period=30"
* // Prints "otpauth://totp/Acme%20Corporation:Alice%20Smith?secret=GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ&amp;issuer=Acme%20Corporation&amp;digits=6&amp;period=30"
* System.out.println(uri.toUriString());
*
* OTPAuthURI uriExample2 = OTPAuthURIBuilder.fromUriString(uri.toUriString()).build();
Expand Down Expand Up @@ -130,8 +130,7 @@ public static OTPAuthURIBuilder fromKey(OTPKey key) {
* (see {@link OTPAuthURIBuilder#counter(long)}).
* @throws IllegalArgumentException
* if {@code uri} is TOTP-based and the period parameter (and/or value)
* is missing, or invalid numerical format, or out of the acceptable range
* (see {@link OTPAuthURIBuilder#period(long)}).
* is missing, or invalid numerical format, or out of the acceptable range
*/
public static OTPAuthURIBuilder fromUriString(String uri) {
Preconditions.checkNotNull(uri);
Expand Down Expand Up @@ -377,7 +376,7 @@ public OTPAuthURIBuilder digits(int digits) {
* specified counter.
*
* @throws IllegalArgumentException
* if {@code counter} is < 0.
* if {@code counter} is {@literal <} 0.
*/
public OTPAuthURIBuilder counter(long counter) {
Preconditions.checkArgument(counter >= 0);
Expand All @@ -399,7 +398,7 @@ public OTPAuthURIBuilder counter(long counter) {
* specified timeStep.
*
* @throws IllegalArgumentException
* if {@code timeStep} is <= 0.
* if {@code timeStep} is {@literal <=} 0.
*/
public OTPAuthURIBuilder timeStep(long timeStep) {
Preconditions.checkArgument(timeStep > 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public QRCodeWriter height(int height) {
/**
* Returns this {@code QRCodeWriter} instance initialized with the
* specified {@link ErrorCorrectionLevel}. The default is
* {@link ErrorCorrectionLevel.L}.
* {@link ErrorCorrectionLevel#L}.
*
* @param errorCorrectionLevel
* the error correction level.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public final class HOTPBuilder {
* {@code movingFactor}.
*
* @throws IllegalArgumentException
* if {@code movingFactor} is < 0.
* if {@code movingFactor} is {@literal <} 0.
*/
public HOTPBuilder movingFactor(long movingFactor) {
Preconditions.checkArgument(movingFactor >= 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static HOTPValidator defaultLookAheadWindow() {
* @return a new {@link HOTPValidator} instance.
*
* @throws IllegalArgumentException
* if {@code lookAheadWindow} is < 1.
* if {@code lookAheadWindow} is {@literal <} 1.
*/
public static HOTPValidator lookAheadWindow(int lookAheadWindow) {
return new HOTPValidator(lookAheadWindow);
Expand Down
18 changes: 9 additions & 9 deletions oath-otp/src/main/java/com/lochbridge/oath/otp/TOTPBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public final class TOTPBuilder {
* {@code timeStep} size.
*
* @throws IllegalArgumentException
* if {@code timeStep} is <= 0.
* if {@code timeStep} is {@literal <=} 0.
*/
public TOTPBuilder timeStep(long timeStep) {
Preconditions.checkArgument(timeStep > 0);
Expand Down Expand Up @@ -163,32 +163,32 @@ public TOTPBuilder hmacSha(HmacShaAlgorithm algorithm) {

/**
* Returns this {@code TOTPBuilder} instance initialized with the
* {@link HmacShaAlgorithm.HMAC_SHA_1}.
* {@link HmacShaAlgorithm#HMAC_SHA_1}.
*
* @return this {@code TOTPBuilder} instance initialized with the
* {@link HmacShaAlgorithm.HMAC_SHA_1}.
* {@link HmacShaAlgorithm#HMAC_SHA_1}.
*/
public TOTPBuilder hmacSha1() {
return hmacSha(HmacShaAlgorithm.HMAC_SHA_1);
}

/**
* Returns this {@code TOTPBuilder} instance initialized with the
* {@link HmacShaAlgorithm.HMAC_SHA_256}.
* {@link HmacShaAlgorithm#HMAC_SHA_256}.
*
* @return this {@code TOTPBuilder} instance initialized with the
* {@link HmacShaAlgorithm.HMAC_SHA_256}.
* {@link HmacShaAlgorithm#HMAC_SHA_256}.
*/
public TOTPBuilder hmacSha256() {
return hmacSha(HmacShaAlgorithm.HMAC_SHA_256);
}

/**
* Returns this {@code TOTPBuilder} instance initialized with the
* {@link HmacShaAlgorithm.HMAC_SHA_512}.
* {@link HmacShaAlgorithm#HMAC_SHA_512}.
*
* @return this {@code TOTPBuilder} instance initialized with the
* {@link HmacShaAlgorithm.HMAC_SHA_512}.
* {@link HmacShaAlgorithm#HMAC_SHA_512}.
*/
public TOTPBuilder hmacSha512() {
return hmacSha(HmacShaAlgorithm.HMAC_SHA_512);
Expand All @@ -213,12 +213,12 @@ public TOTP build() {
* configuration/generation calls.
*
* @param time
* the time (in milliseconds) (must be >= 0)
* the time (in milliseconds) (must be {@literal >= 0})
*
* @return a Time-based One-time Password {@link TOTP} instance.
*
* @throws IllegalArgumentException
* if {@code time} < 0.
* if {@code time} {@literal <} 0.
*/
public TOTP build(long time) {
Preconditions.checkArgument(time >= 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static TOTPValidator defaultWindow() {
* @return a new {@link TOTPValidator} instance.
*
* @throws IllegalArgumentException
* if {@code window} is < 0.
* if {@code window} is {@literal <} 0.
*/
public static TOTPValidator window(int window) {
return new TOTPValidator(window);
Expand Down

0 comments on commit d0f2267

Please sign in to comment.