def __get_auth(self): '''Return auth headers. Will use API Keys if present in settings.''' if self.shouldAuth is False: return [] self.logger.info("Authenticating with API Key.") # To auth to the WS using an API key, we generate a signature of a nonce and # the WS API endpoint. nonce = generate_expires() return [ "api-expires: " + str(nonce), "api-signature: " + generate_signature(settings.API_SECRET, 'GET', '/realtime', nonce, ''), "api-key:" + settings.API_KEY ]
def __get_auth(self): '''Return auth headers. Will use API Keys if present in settings.''' if self.shouldAuth is False: return [] self.logger.info("Authenticating with API Key.") # To auth to the WS using an API key, we generate a signature of a nonce and # the WS API endpoint. nonce = generate_expires() return [ "api-expires: " + str(nonce), "api-signature: " + generate_signature(self.apiSecret, 'GET', '/realtime', nonce, ''), "api-key:" + self.apiKey ]
def __get_auth(self): """Return auth headers. Will use API Keys if present in settings.""" if self.shouldAuth is False: return [] self.logger.info("Authenticating with API Key.") # To auth to the WS using an API key, we generate a signature of a nonce and # the WS API endpoint. nonce = generate_expires() return [ "api-expires: " + str(nonce), "api-signature: " + generate_signature(settings.API_SECRET, "GET", "/realtime", nonce, ""), "api-key:" + settings.API_KEY, ]