Search in sources :

Example 1 with TokenManager

use of com.symphony.api.bindings.TokenManager 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;
}
Also used : TokenManager(com.symphony.api.bindings.TokenManager) ApiBuilder(com.symphony.api.bindings.ApiBuilder)

Aggregations

ApiBuilder (com.symphony.api.bindings.ApiBuilder)1 TokenManager (com.symphony.api.bindings.TokenManager)1