/**
  * @param Integration $settings
  */
 public function setIntegrationSettings(Integration $settings)
 {
     //make sure URL does not have ending /
     $keys = $this->getDecryptedApiKeys($settings);
     if (isset($keys['url']) && substr($keys['url'], -1) == '/') {
         $keys['url'] = substr($keys['url'], 0, -1);
         $this->encryptAndSetApiKeys($keys, $settings);
     }
     parent::setIntegrationSettings($settings);
 }
Example #2
0
 public function __construct(AbstractIntegration $integration, Request $request, $settings = array())
 {
     $keys = $integration->getDecryptedApiKeys();
     $this->clientId = $keys[$integration->getClientIdKey()];
     $this->clientSecret = $keys[$integration->getClientSecretKey()];
     $authToken = $integration->getAuthTokenKey();
     $this->accessToken = isset($keys[$authToken]) ? $keys[$authToken] : '';
     $this->accessTokenSecret = isset($settings['token_secret']) ? $settings['token_secret'] : '';
     $this->callback = $integration->getAuthCallbackUrl();
     $this->settings = $settings;
     $this->request = $request;
 }
 /**
  * @param AbstractIntegration $integration
  */
 public function __construct(AbstractIntegration $integration)
 {
     $this->integration = $integration;
     $this->keys = $integration->getKeys();
 }