protected BitcoinCoreAccountServiceRaw(Exchange exchange) { super(exchange); ExchangeSpecification specification = exchange.getExchangeSpecification(); ClientConfig config = getClientConfig(); String user = specification.getUserName(); ClientConfigUtil.addBasicAuthCredentials( config, user == null ? "" : user, specification.getPassword()); bitcoinCore = RestProxyFactory.createProxy(BitcoinCore.class, specification.getPlainTextUri(), config); }
public String digestParams(RestInvocation restInvocation) { // ignore restInvocation, just need username & password return ClientConfigUtil.digestForBasicAuth(username, password); } }
public String digestParams(RestInvocation restInvocation) { // ignore restInvocation, just need username & password return ClientConfigUtil.digestForBasicAuth(username, password); } }
protected CoinfloorAuthenticatedService(Exchange exchange) { super(exchange); ExchangeSpecification specification = exchange.getExchangeSpecification(); if (specification.getUserName() == null || specification.getPassword() == null) { logger.info( "Authenticated endpoints are not available - username and password have not been configured"); coinfloor = null; return; } ClientConfig config = getClientConfig(); ClientConfigUtil.addBasicAuthCredentials( config, specification.getUserName(), specification.getPassword()); coinfloor = RestProxyFactory.createProxy( CoinfloorAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), config); } }
public static ClientConfig addBasicAuthCredentials(ClientConfig config, String user, String password) { return config.addDefaultParam(HeaderParam.class, "Authorization", digestForBasicAuth(user, password)); }
protected HitbtcBaseService(Exchange exchange) { super(exchange); String apiKey = exchange.getExchangeSpecification().getApiKey(); String secretKey = exchange.getExchangeSpecification().getSecretKey(); ClientConfig config = getClientConfig(); ClientConfigUtil.addBasicAuthCredentials(config, apiKey, secretKey); hitbtc = RestProxyFactory.createProxy( HitbtcAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), config); } }
public static ClientConfig addBasicAuthCredentials(ClientConfig config, String user, String password) { return config.addDefaultParam(HeaderParam.class, "Authorization", digestForBasicAuth(user, password)); }
protected HitbtcBaseService(Exchange exchange) { super(exchange); String apiKey = exchange.getExchangeSpecification().getApiKey(); String secretKey = exchange.getExchangeSpecification().getSecretKey(); ClientConfig config = getClientConfig(); ClientConfigUtil.addBasicAuthCredentials(config, apiKey, secretKey); hitbtc = RestProxyFactory.createProxy( HitbtcAuthenticated.class, exchange.getExchangeSpecification().getSslUri(), config); } }