Skip to content

Commit

Permalink
Adjust javadocs so they build correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronAtDuo committed Mar 15, 2021
1 parent a9c84d3 commit ba7f2e8
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ The Duo Universal Client for Java is available from Duo Security on Maven. Incl
<dependency>
<groupId>com.duosecurity</groupId>
<artifactId>duo-universal-sdk</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</dependency>
```
See https://mvnrepository.com/artifact/com.duosecurity/duo-universal-sdk/1.1.0 for more details.
See https://mvnrepository.com/artifact/com.duosecurity/duo-universal-sdk/1.1.1 for more details.

# Demo

Expand Down
4 changes: 2 additions & 2 deletions duo-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>duo-example</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<name>Duo Universal Java</name>
<url>https://github.com/duosecurity/duo_universal_java/</url>
<description>Duo Web SDK for two-factor authentication</description>
Expand Down Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>com.duosecurity</groupId>
<artifactId>duo-universal-sdk</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
Expand Down
2 changes: 1 addition & 1 deletion duo-universal-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<artifactId>duo-universal-sdk</artifactId>
<groupId>com.duosecurity</groupId>
<version>1.1.0</version>
<version>1.1.1</version>
<name>Duo Universal Java</name>
<url>https://github.com/duosecurity/duo_universal_java/</url>
<description>Duo Web SDK for two-factor authentication</description>
Expand Down
24 changes: 21 additions & 3 deletions duo-universal-sdk/src/main/java/com/duosecurity/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class Client {

private static final String USER_AGENT_LIB = "duo_universal_java";

private static final String USER_AGENT_VERSION = "1.1.0";
private static final String USER_AGENT_VERSION = "1.1.1";

// **************************************************
// Fields
Expand Down Expand Up @@ -68,6 +68,12 @@ private Client() {

/**
* Legacy simple constructor.
* @param clientId This value is the client id provided by Duo in the admin panel.
* @param clientSecret This value is the client secret provided by Duo in the admin panel.
* @param apiHost This value is the api host provided by Duo in the admin panel.
* @param redirectUri This value is the uri which Duo should redirect to after 2FA is completed.
*
* @throws DuoException For problems building the client
* @deprecated The constructors are deprecated.
* Prefer the {@link Client.Builder} for instantiating Clients
*/
Expand All @@ -79,6 +85,14 @@ public Client(String clientId, String clientSecret, String apiHost, String redir

/**
* Legacy constructor which allows specifying custom CaCerts.
* @param clientId This value is the client id provided by Duo in the admin panel.
* @param clientSecret This value is the client secret provided by Duo in the admin panel.
* @param apiHost This value is the api host provided by Duo in the admin panel.
* @param redirectUri This value is the uri which Duo should redirect to after 2FA is completed.
* @param userCaCerts This value is a list of CA Certificates used to validate connections to Duo
*
* @throws DuoException For problems building the client
*
* @deprecated The constructors are deprecated.
* Prefer the {@link Client.Builder} for instantiating Clients
*/
Expand Down Expand Up @@ -136,8 +150,6 @@ public static class Builder {
* @param clientSecret This value is the client secret provided by Duo in the admin panel.
* @param apiHost This value is the api host provided by Duo in the admin panel.
* @param redirectUri This value is the uri which Duo should redirect to after 2FA is completed.
*
* @throws DuoException For problems validating the client parameters
*/
public Builder(String clientId, String clientSecret, String apiHost,
String redirectUri) {
Expand Down Expand Up @@ -176,6 +188,8 @@ public Client build() throws DuoException {
* Optionally use custom CA Certificates when validating connections to Duo.
*
* @param userCaCerts List of CA Certificates to use
*
* @return the Builder
*/
public Builder setCACerts(String[] userCaCerts) {
if (validateCaCert(userCaCerts)) {
Expand All @@ -189,6 +203,8 @@ public Builder setCACerts(String[] userCaCerts) {
* Defaults true to use duo_code.
*
* @param useDuoCodeAttribute true/false toggle
*
* @return the Builder
*/
public Builder setUseDuoCodeAttribute(boolean useDuoCodeAttribute) {
this.useDuoCodeAttribute = useDuoCodeAttribute;
Expand All @@ -199,6 +215,8 @@ public Builder setUseDuoCodeAttribute(boolean useDuoCodeAttribute) {
* Optionally appends string to userAgent.
*
* @param newUserAgent Additional info that will be added to the end of the user agent string
*
* @return the Builder
*/
public Builder appendUserAgentInfo(String newUserAgent) {
userAgent = format("%s %s", userAgent, newUserAgent);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.duosecurity</groupId>
<artifactId>duo-universal-java</artifactId>
<packaging>pom</packaging>
<version>1.1.0</version>
<version>1.1.1</version>

<name>Duo Universal Java</name>
<url>https://github.com/duosecurity/duo_universal_java/</url>
Expand Down

0 comments on commit ba7f2e8

Please sign in to comment.