|
|
|
@ -104,6 +104,7 @@ import org.thingsboard.server.common.data.kv.TsKvEntry; |
|
|
|
import org.thingsboard.server.common.data.oauth2.OAuth2ClientInfo; |
|
|
|
import org.thingsboard.server.common.data.oauth2.OAuth2ClientRegistrationTemplate; |
|
|
|
import org.thingsboard.server.common.data.oauth2.OAuth2Info; |
|
|
|
import org.thingsboard.server.common.data.oauth2.PlatformType; |
|
|
|
import org.thingsboard.server.common.data.ota.ChecksumAlgorithm; |
|
|
|
import org.thingsboard.server.common.data.ota.OtaPackageType; |
|
|
|
import org.thingsboard.server.common.data.page.PageData; |
|
|
|
@ -1772,7 +1773,7 @@ public class RestClient implements ClientHttpRequestInterceptor, Closeable { |
|
|
|
}).getBody(); |
|
|
|
} |
|
|
|
|
|
|
|
public List<OAuth2ClientInfo> getOAuth2Clients(String pkgName) { |
|
|
|
public List<OAuth2ClientInfo> getOAuth2Clients(String pkgName, PlatformType platformType) { |
|
|
|
Map<String, String> params = new HashMap<>(); |
|
|
|
StringBuilder urlBuilder = new StringBuilder(baseURL); |
|
|
|
urlBuilder.append("/api/noauth/oauth2Clients"); |
|
|
|
@ -1780,6 +1781,15 @@ public class RestClient implements ClientHttpRequestInterceptor, Closeable { |
|
|
|
urlBuilder.append("?pkgName={pkgName}"); |
|
|
|
params.put("pkgName", pkgName); |
|
|
|
} |
|
|
|
if (platformType != null) { |
|
|
|
if (pkgName != null) { |
|
|
|
urlBuilder.append("&"); |
|
|
|
} else { |
|
|
|
urlBuilder.append("?"); |
|
|
|
} |
|
|
|
urlBuilder.append("platform={platform}"); |
|
|
|
params.put("platform", platformType.name()); |
|
|
|
} |
|
|
|
return restTemplate.exchange( |
|
|
|
urlBuilder.toString(), |
|
|
|
HttpMethod.POST, |
|
|
|
|