Skip to content

Commit 676cfb1

Browse files
committed
reverted to just webrtc release
1 parent 8f94b5c commit 676cfb1

File tree

60 files changed

+1433
-2309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1433
-2309
lines changed

pom.xml

Lines changed: 83 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@
4646
</plugins>
4747
</pluginManagement>
4848
<plugins>
49-
<plugin>
50-
<groupId>org.codehaus.mojo</groupId>
51-
<artifactId>versions-maven-plugin</artifactId>
52-
<version>2.5</version>
53-
<configuration>
54-
<rulesUri>file://${project.basedir}/version-rules.xml</rulesUri>
55-
</configuration>
56-
</plugin>
5749
<plugin>
5850
<groupId>org.apache.maven.plugins</groupId>
5951
<artifactId>maven-enforcer-plugin</artifactId>
@@ -84,12 +76,55 @@
8476
<appendAssemblyId>false</appendAssemblyId>
8577
</configuration>
8678
</plugin>
79+
<plugin>
80+
<groupId>org.apache.maven.plugins</groupId>
81+
<artifactId>maven-source-plugin</artifactId>
82+
<version>3.1.0</version>
83+
<executions>
84+
<execution>
85+
<id>attach-sources</id>
86+
<goals>
87+
<goal>jar</goal>
88+
</goals>
89+
</execution>
90+
</executions>
91+
</plugin>
92+
<plugin>
93+
<groupId>org.apache.maven.plugins</groupId>
94+
<artifactId>maven-gpg-plugin</artifactId>
95+
<version>1.5</version>
96+
<executions>
97+
<execution>
98+
<id>sign-artifacts</id>
99+
<phase>verify</phase>
100+
<goals>
101+
<goal>sign</goal>
102+
</goals>
103+
</execution>
104+
</executions>
105+
</plugin>
106+
<plugin>
107+
<groupId>org.apache.maven.plugins</groupId>
108+
<artifactId>maven-javadoc-plugin</artifactId>
109+
<version>3.1.1</version>
110+
<configuration>
111+
<failOnError>false</failOnError>
112+
</configuration>
113+
<executions>
114+
<execution>
115+
<id>attach-javadocs</id>
116+
<goals>
117+
<goal>jar</goal>
118+
</goals>
119+
</execution>
120+
</executions>
121+
</plugin>
87122
</plugins>
88123
</build>
89124

90125
<properties>
91126
<jackson.version>2.9.10</jackson.version>
92-
<jackson.databind.version>2.9.10.5</jackson.databind.version>
127+
<jackson.databind.version>2.9.10.7</jackson.databind.version>
93128
<maven.compiler.source>1.8</maven.compiler.source>
94129
<maven.compiler.target>1.8</maven.compiler.target>
95130
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -121,7 +156,7 @@
121156
<dependency>
122157
<groupId>com.squareup.okhttp3</groupId>
123158
<artifactId>okhttp</artifactId>
124-
<version>[3.12, 4.9.1]</version>
159+
<version>3.12.1</version>
125160
</dependency>
126161
<dependency>
127162
<groupId>com.fasterxml.jackson.core</groupId>
@@ -145,4 +180,41 @@
145180
<scope>test</scope>
146181
</dependency>
147182
</dependencies>
148-
</project>
183+
<distributionManagement>
184+
<snapshotRepository>
185+
<id>ossrh</id>
186+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
187+
</snapshotRepository>
188+
<repository>
189+
<id>ossrh</id>
190+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
191+
</repository>
192+
</distributionManagement>
193+
<parent>
194+
<groupId>org.sonatype.oss</groupId>
195+
<artifactId>oss-parent</artifactId>
196+
<version>7</version>
197+
</parent>
198+
<licenses>
199+
<license>
200+
<name>Apache License, Version 2.0</name>
201+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
202+
<distribution>repo</distribution>
203+
</license>
204+
</licenses>
205+
<scm>
206+
<url>https://github.com/Bandwidth/java-sdk</url>
207+
<connection>scm:git:[email protected]:Bandwidth/java-sdk.git</connection>
208+
<developerConnection>scm:git:[email protected]:Bandwidth/java-sdk.git</developerConnection>
209+
</scm>
210+
<developers>
211+
<developer>
212+
<id>support</id>
213+
<name>Bandwidth Support</name>
214+
<email>[email protected]</email>
215+
<organization>Bandwidth, Inc.</organization>
216+
<organizationUrl>http://bandwidth.com</organizationUrl>
217+
<timezone>-5</timezone>
218+
</developer>
219+
</developers>
220+
</project>

src/main/java/com/bandwidth/ApiHelper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.bandwidth.http.request.MultipartWrapper;
1212
import com.fasterxml.jackson.annotation.JsonFormat;
1313
import com.fasterxml.jackson.annotation.JsonGetter;
14+
import com.fasterxml.jackson.annotation.JsonInclude;
1415
import com.fasterxml.jackson.core.JsonProcessingException;
1516
import com.fasterxml.jackson.core.type.TypeReference;
1617
import com.fasterxml.jackson.databind.DeserializationFeature;
@@ -51,6 +52,7 @@ public class ApiHelper {
5152
private static final long serialVersionUID = -174113593500315394L;
5253
{
5354
configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
55+
setSerializationInclusion(JsonInclude.Include.NON_NULL);
5456
configOverride(BigDecimal.class).setFormat(
5557
JsonFormat.Value.forShape(JsonFormat.Shape.STRING));
5658
}

src/main/java/com/bandwidth/BandwidthClient.java

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public final class BandwidthClient implements Configuration {
2626
* Private store for clients.
2727
*/
2828
private MessagingClient messagingClient;
29-
private MultiFactorAuthClient multiFactorAuthClient;
29+
private TwoFactorAuthClient twoFactorAuthClient;
3030
private VoiceClient voiceClient;
3131
private WebRtcClient webRtcClient;
3232

@@ -61,9 +61,9 @@ public final class BandwidthClient implements Configuration {
6161
private MessagingBasicAuthManager messagingBasicAuthManager;
6262

6363
/**
64-
* MultiFactorAuthBasicAuthManager.
64+
* TwoFactorAuthBasicAuthManager.
6565
*/
66-
private MultiFactorAuthBasicAuthManager multiFactorAuthBasicAuthManager;
66+
private TwoFactorAuthBasicAuthManager twoFactorAuthBasicAuthManager;
6767

6868
/**
6969
* VoiceBasicAuthManager.
@@ -88,7 +88,7 @@ public final class BandwidthClient implements Configuration {
8888
private BandwidthClient(Environment environment, String baseUrl, HttpClient httpClient,
8989
long timeout, ReadonlyHttpClientConfiguration httpClientConfig,
9090
String messagingBasicAuthUserName, String messagingBasicAuthPassword,
91-
String multiFactorAuthBasicAuthUserName, String multiFactorAuthBasicAuthPassword,
91+
String twoFactorAuthBasicAuthUserName, String twoFactorAuthBasicAuthPassword,
9292
String voiceBasicAuthUserName, String voiceBasicAuthPassword,
9393
String webRtcBasicAuthUserName, String webRtcBasicAuthPassword,
9494
Map<String, AuthManager> authManagers, HttpCallback httpCallback) {
@@ -113,17 +113,17 @@ private BandwidthClient(Environment environment, String baseUrl, HttpClient http
113113
this.authManagers.put("messaging", messagingBasicAuthManager);
114114
}
115115

116-
if (this.authManagers.containsKey("multiFactorAuth")) {
117-
this.multiFactorAuthBasicAuthManager =
118-
(MultiFactorAuthBasicAuthManager) this.authManagers.get("multiFactorAuth");
116+
if (this.authManagers.containsKey("twoFactorAuth")) {
117+
this.twoFactorAuthBasicAuthManager =
118+
(TwoFactorAuthBasicAuthManager) this.authManagers.get("twoFactorAuth");
119119
}
120120

121-
if (!this.authManagers.containsKey("multiFactorAuth")
122-
|| !getMultiFactorAuthBasicAuthCredentials().equals(
123-
multiFactorAuthBasicAuthUserName, multiFactorAuthBasicAuthPassword)) {
124-
this.multiFactorAuthBasicAuthManager = new MultiFactorAuthBasicAuthManager(
125-
multiFactorAuthBasicAuthUserName, multiFactorAuthBasicAuthPassword);
126-
this.authManagers.put("multiFactorAuth", multiFactorAuthBasicAuthManager);
121+
if (!this.authManagers.containsKey("twoFactorAuth")
122+
|| !getTwoFactorAuthBasicAuthCredentials().equals(twoFactorAuthBasicAuthUserName,
123+
twoFactorAuthBasicAuthPassword)) {
124+
this.twoFactorAuthBasicAuthManager = new TwoFactorAuthBasicAuthManager(
125+
twoFactorAuthBasicAuthUserName, twoFactorAuthBasicAuthPassword);
126+
this.authManagers.put("twoFactorAuth", twoFactorAuthBasicAuthManager);
127127
}
128128

129129
if (this.authManagers.containsKey("voice")) {
@@ -152,7 +152,7 @@ private BandwidthClient(Environment environment, String baseUrl, HttpClient http
152152

153153

154154
messagingClient = new MessagingClient(this);
155-
multiFactorAuthClient = new MultiFactorAuthClient(this);
155+
twoFactorAuthClient = new TwoFactorAuthClient(this);
156156
voiceClient = new VoiceClient(this);
157157
webRtcClient = new WebRtcClient(this);
158158
}
@@ -173,11 +173,11 @@ public MessagingClient getMessagingClient() {
173173
}
174174

175175
/**
176-
* Provides access to multiFactorAuthClient Client.
177-
* @return Returns the MultiFactorAuthClient instance
176+
* Provides access to twoFactorAuthClient Client.
177+
* @return Returns the TwoFactorAuthClient instance
178178
*/
179-
public MultiFactorAuthClient getMultiFactorAuthClient() {
180-
return multiFactorAuthClient;
179+
public TwoFactorAuthClient getTwoFactorAuthClient() {
180+
return twoFactorAuthClient;
181181
}
182182

183183
/**
@@ -245,11 +245,11 @@ public MessagingBasicAuthCredentials getMessagingBasicAuthCredentials() {
245245
}
246246

247247
/**
248-
* The credentials to use with MultiFactorAuthBasicAuth.
249-
* @return multiFactorAuthBasicAuthCredentials
248+
* The credentials to use with TwoFactorAuthBasicAuth.
249+
* @return twoFactorAuthBasicAuthCredentials
250250
*/
251-
public MultiFactorAuthBasicAuthCredentials getMultiFactorAuthBasicAuthCredentials() {
252-
return multiFactorAuthBasicAuthManager;
251+
public TwoFactorAuthBasicAuthCredentials getTwoFactorAuthBasicAuthCredentials() {
252+
return twoFactorAuthBasicAuthManager;
253253
}
254254

255255
/**
@@ -312,7 +312,7 @@ private static String environmentMapper(Environment environment, Server server)
312312
if (server.equals(Server.MESSAGINGDEFAULT)) {
313313
return "https://messaging.bandwidth.com/api/v2";
314314
}
315-
if (server.equals(Server.MULTIFACTORAUTHDEFAULT)) {
315+
if (server.equals(Server.TWOFACTORAUTHDEFAULT)) {
316316
return "https://mfa.bandwidth.com/api/v1";
317317
}
318318
if (server.equals(Server.VOICEDEFAULT)) {
@@ -329,7 +329,7 @@ private static String environmentMapper(Environment environment, Server server)
329329
if (server.equals(Server.MESSAGINGDEFAULT)) {
330330
return "{base_url}";
331331
}
332-
if (server.equals(Server.MULTIFACTORAUTHDEFAULT)) {
332+
if (server.equals(Server.TWOFACTORAUTHDEFAULT)) {
333333
return "{base_url}";
334334
}
335335
if (server.equals(Server.VOICEDEFAULT)) {
@@ -367,10 +367,10 @@ public Builder newBuilder() {
367367
getMessagingBasicAuthCredentials().getBasicAuthUserName();
368368
builder.messagingBasicAuthPassword =
369369
getMessagingBasicAuthCredentials().getBasicAuthPassword();
370-
builder.multiFactorAuthBasicAuthUserName =
371-
getMultiFactorAuthBasicAuthCredentials().getBasicAuthUserName();
372-
builder.multiFactorAuthBasicAuthPassword =
373-
getMultiFactorAuthBasicAuthCredentials().getBasicAuthPassword();
370+
builder.twoFactorAuthBasicAuthUserName =
371+
getTwoFactorAuthBasicAuthCredentials().getBasicAuthUserName();
372+
builder.twoFactorAuthBasicAuthPassword =
373+
getTwoFactorAuthBasicAuthCredentials().getBasicAuthPassword();
374374
builder.voiceBasicAuthUserName = getVoiceBasicAuthCredentials().getBasicAuthUserName();
375375
builder.voiceBasicAuthPassword = getVoiceBasicAuthCredentials().getBasicAuthPassword();
376376
builder.webRtcBasicAuthUserName = getWebRtcBasicAuthCredentials().getBasicAuthUserName();
@@ -391,8 +391,8 @@ public static class Builder {
391391
private long timeout = 0;
392392
private String messagingBasicAuthUserName = "TODO: Replace";
393393
private String messagingBasicAuthPassword = "TODO: Replace";
394-
private String multiFactorAuthBasicAuthUserName = "TODO: Replace";
395-
private String multiFactorAuthBasicAuthPassword = "TODO: Replace";
394+
private String twoFactorAuthBasicAuthUserName = "TODO: Replace";
395+
private String twoFactorAuthBasicAuthPassword = "TODO: Replace";
396396
private String voiceBasicAuthUserName = "TODO: Replace";
397397
private String voiceBasicAuthPassword = "TODO: Replace";
398398
private String webRtcBasicAuthUserName = "TODO: Replace";
@@ -421,21 +421,21 @@ public Builder messagingBasicAuthCredentials(String basicAuthUserName,
421421
}
422422

423423
/**
424-
* Credentials setter for MultiFactorAuthBasicAuth.
425-
* @param basicAuthUserName String value for multiFactorAuthBasicAuthUserName.
426-
* @param basicAuthPassword String value for multiFactorAuthBasicAuthPassword.
424+
* Credentials setter for TwoFactorAuthBasicAuth.
425+
* @param basicAuthUserName String value for twoFactorAuthBasicAuthUserName.
426+
* @param basicAuthPassword String value for twoFactorAuthBasicAuthPassword.
427427
* @return Builder
428428
*/
429-
public Builder multiFactorAuthBasicAuthCredentials(String basicAuthUserName,
429+
public Builder twoFactorAuthBasicAuthCredentials(String basicAuthUserName,
430430
String basicAuthPassword) {
431431
if (basicAuthUserName == null) {
432432
throw new NullPointerException("BasicAuthUserName cannot be null.");
433433
}
434434
if (basicAuthPassword == null) {
435435
throw new NullPointerException("BasicAuthPassword cannot be null.");
436436
}
437-
this.multiFactorAuthBasicAuthUserName = basicAuthUserName;
438-
this.multiFactorAuthBasicAuthPassword = basicAuthPassword;
437+
this.twoFactorAuthBasicAuthUserName = basicAuthUserName;
438+
this.twoFactorAuthBasicAuthPassword = basicAuthPassword;
439439
return this;
440440
}
441441

@@ -535,7 +535,7 @@ public BandwidthClient build() {
535535

536536
return new BandwidthClient(environment, baseUrl, httpClient, timeout, httpClientConfig,
537537
messagingBasicAuthUserName, messagingBasicAuthPassword,
538-
multiFactorAuthBasicAuthUserName, multiFactorAuthBasicAuthPassword,
538+
twoFactorAuthBasicAuthUserName, twoFactorAuthBasicAuthPassword,
539539
voiceBasicAuthUserName, voiceBasicAuthPassword, webRtcBasicAuthUserName,
540540
webRtcBasicAuthPassword, authManagers, httpCallback);
541541
}

src/main/java/com/bandwidth/Configuration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public interface Configuration {
4444
MessagingBasicAuthCredentials getMessagingBasicAuthCredentials();
4545

4646
/**
47-
* The credentials to use with MultiFactorAuthBasicAuth.
48-
* @return multiFactorAuthBasicAuthCredentials
47+
* The credentials to use with TwoFactorAuthBasicAuth.
48+
* @return twoFactorAuthBasicAuthCredentials
4949
*/
50-
MultiFactorAuthBasicAuthCredentials getMultiFactorAuthBasicAuthCredentials();
50+
TwoFactorAuthBasicAuthCredentials getTwoFactorAuthBasicAuthCredentials();
5151

5252
/**
5353
* The credentials to use with VoiceBasicAuth.

0 commit comments

Comments
 (0)