Commit 9316d8b7 authored by Daniel Gultsch's avatar Daniel Gultsch
Browse files

make sure provider verification has no unaccepted null values

parent c0712f20
{
"domain": "quicksy.im",
"validate_phone_numbers": true,
"prevent_registration": false,
"min_version": "2.3.0",
"account_inactivity": "P28D",
"xmpp": {
"jid": "api.quicksy.im",
"secret": "…"
},
"web": {
"host": "127.0.0.1",
"port": 4567
},
"db": {
"ejabberd": {
"url": "jdbc:mariadb://localhost:3306/ejabberd?characterEncoding=utf8",
"username": "…",
"password": "…"
},
"quicksy": {
"url": "jdbc:mariadb://localhost:3306/quicksy?characterEncoding=utf8",
"username": "…",
"password": "…"
}
},
"provider": {
"im.quicksy.server.verification.NexmoVerificationProvider": {
"deny": [
91
],
"parameter": {
"api_key": "…",
"api_secret": "…",
"phone_number": "…"
}
},
"im.quicksy.server.verification.TwilioVerificationProvider": {
"parameter": {
"auth_token": "…"
}
}
},
"pay_pal": {
"username": "…",
"password": "…",
"signature": "…"
},
"cim_auth_token": "…"
}
{
"domain": "quicksy.im",
"twilio_auth_token": "***",
"validate_phone_numbers": true,
"min_version": "2.3.0",
"account_inactivity": "P28D",
"xmpp": {
"jid": "api.quicksy.im",
"secret": "***"
},
"web": {
"host": "127.0.0.1",
"port": 4567
},
"db": {
"ejabberd" : {
"url": "jdbc:mariadb://localhost:3306/ejabberd?characterEncoding=utf8"
"username": "***",
"password": "***"
},
"quicksy" : {
"url": "jdbc:mariadb://localhost:3306/quicksy?characterEncoding=utf8"
}
},
"pay_pal": {
"username": "***",
"password": "***",
"signature": "***"
},
"cim_auth_token": "***"
}
......@@ -227,7 +227,7 @@ public class Configuration {
}
public List<Integer> getDeny() {
return deny;
return deny == null ? Collections.emptyList() : deny;
}
}
}
......@@ -85,8 +85,8 @@ public class MetaVerificationProvider implements VerificationProvider {
private final AbstractVerificationProvider provider;
private ProviderWrapper(List<Integer> deny, AbstractVerificationProvider provider) {
this.deny = deny;
this.provider = provider;
this.deny = Preconditions.checkNotNull(deny);
this.provider = Preconditions.checkNotNull(provider);
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment