-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathOAuthConfig.java
More file actions
37 lines (30 loc) · 1015 Bytes
/
OAuthConfig.java
File metadata and controls
37 lines (30 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.icoderman.woocommerce.oauth;
public final class OAuthConfig {
private final String url;
private final String consumerKey;
private final String consumerSecret;
private final Boolean sslTrusted;
public OAuthConfig(String url, String consumerKey, String consumerSecret, Boolean sslTrusted) {
if (url == null || url.isEmpty() ||
consumerKey == null || consumerKey.isEmpty() ||
consumerSecret == null || consumerSecret.isEmpty()) {
throw new IllegalArgumentException("All arguments are required");
}
this.url = url;
this.consumerKey = consumerKey;
this.consumerSecret = consumerSecret;
this.sslTrusted = sslTrusted;
}
public String getUrl() {
return url;
}
public String getConsumerKey() {
return consumerKey;
}
public String getConsumerSecret() {
return consumerSecret;
}
public Boolean getSslTrusted() {
return sslTrusted;
}
}