Commit 39f2a0a0 authored by Matija Obreza's avatar Matija Obreza
Browse files

Support blank OAuth client secret

parent dd1b6fe5
...@@ -92,7 +92,11 @@ public class GenesysClient { ...@@ -92,7 +92,11 @@ public class GenesysClient {
*/ */
public GenesysClient(final String baseUrl, final String clientId, final String clientSecret, final String callbackUrl, String scope) { public GenesysClient(final String baseUrl, final String clientId, final String clientSecret, final String callbackUrl, String scope) {
this.baseUrl = baseUrl; this.baseUrl = baseUrl;
service = new ServiceBuilder(clientId).apiSecret(clientSecret).callback(callbackUrl).scope(scope).build(new GenesysApi(baseUrl)); ServiceBuilder serviceBuilder = new ServiceBuilder(clientId).callback(callbackUrl).scope(scope);
if (StringUtils.isNotBlank(clientSecret)) {
serviceBuilder.apiSecret(clientSecret);
}
service = serviceBuilder.build(new GenesysApi(baseUrl));
} }
/** /**
......
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