Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Classes/Finisher/SendParametersFinisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ public function sendFinisher()
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $curlSettings['params']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
/* Set username and password for basic auth - if any*/
if (!empty($curlSettings['username']) && !empty($curlSettings['password'])) {
$username = $curlSettings['username'];
$password = $curlSettings['password'];
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_USERPWD, "$username:$password");
}
curl_exec($curl);
curl_close($curl);
$this->writeToDevelopmentLog();
Expand Down Expand Up @@ -120,6 +127,8 @@ protected function getCurlSettings()
{
return [
'url' => $this->configuration['targetUrl'],
'username' => $this->configuration['username'],
'password' => $this->configuration['password'],
'params' => $this->getValues()
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ See TypoScript Settings example:
# Target URL for POST values (like http://www.target.com/target.php)
targetUrl = http://eloqua.com/e/f.aspx

# Basic Auth Protection - leave empty if Target is not protected
username =
password =

# build your post values like &param1=value1&param2=value2
values = COA
values {
Expand Down