use of com.symphony.api.bindings.ApiBuilder in project spring-bot by finos.
the class PodInfoStoreTokenStrategy method certBasedRequest.
@Override
protected ExtensionAppTokens certBasedRequest(String appToken, PodInfo pod) throws Exception {
ApiBuilder ab = setupApiBuilder(pod, pod.getPayload().getSessionAuthUrl());
CertificateAuthenticationApi aa = ab.getApi(CertificateAuthenticationApi.class);
ExtensionAppAuthenticateRequest ar = new ExtensionAppAuthenticateRequest();
ar.setAppToken(appToken);
ExtensionAppTokens out = aa.v1AuthenticateExtensionAppPost(ar);
return out;
}
use of com.symphony.api.bindings.ApiBuilder in project spring-bot by finos.
the class DefaultApiInstanceFactory method createApiInstance.
@Override
public ApiInstance createApiInstance(SymphonyIdentity id, PodProperties pp, TrustManager[] trustManagers) throws Exception {
ApiInstance parent = super.createApiInstance(id, pp, trustManagers);
ApiBuilder agentApiBuilder = ((BasicAPIInstance) parent).agentApiBuilder;
AgentHealthHelper agentHealth = new AgentHealthHelper(agentApiBuilder);
HealthCheckingApiInstance out = new HealthCheckingApiInstance(parent, agentHealth);
if (registry != null) {
String healthIndicatorName = "symphony-api-" + id.getCommonName() + "-" + pp.getId();
if (registry.getContributor(healthIndicatorName) == null) {
registry.registerContributor(healthIndicatorName, out);
}
}
return out;
}
use of com.symphony.api.bindings.ApiBuilder in project spring-bot by finos.
the class AbstractGenericInstanceTokenManagingFactory method createApiInstance.
@Override
public ApiInstance createApiInstance(ID id, PodProperties pp, TrustManager[] trustManagers) throws Exception {
ApiBuilder sessionAuthApiBuilder = createApiBuilder(pp, pp.getSessionAuth(), id, trustManagers, "sessionAuth");
ApiBuilder keyAuthApiBuilder = createApiBuilder(pp, pp.getKeyAuth(), id, trustManagers, "keyAuth");
ApiBuilder relayApiBuilder = createApiBuilder(pp, pp.getRelay(), id, trustManagers, "relay");
ApiBuilder loginApiBuilder = createApiBuilder(pp, pp.getLogin(), id, trustManagers, "login");
TokenManager tm = createTokenManager(id, pp, sessionAuthApiBuilder, keyAuthApiBuilder, relayApiBuilder, loginApiBuilder);
ApiBuilder podApiBuilder = createApiBuilder(pp, pp.getPod(), id, trustManagers, "pod", tm);
ApiBuilder agentApiBuilder = createApiBuilder(pp, pp.getAgent(), id, trustManagers, "agent", tm);
ApiInstance out = new BasicAPIInstance(sessionAuthApiBuilder, keyAuthApiBuilder, relayApiBuilder, loginApiBuilder, podApiBuilder, agentApiBuilder, getIdentity(id));
return out;
}
use of com.symphony.api.bindings.ApiBuilder in project spring-bot by finos.
the class PodInfoStoreTokenStrategy method getPodApi.
@Override
protected PodApi getPodApi(Map<String, Object> claims) throws Exception {
String companyId = getCompanyId(claims);
PodInfo pi = getPodProperties(companyId);
if (pi == null) {
return null;
}
ApiBuilder ab = setupApiBuilder(pi, pi.getPayload().getPodUrl());
return ab.getApi(PodApi.class);
}
Aggregations