Add GitHub OTP to request headers

main
Chris Smith 11 years ago
parent 3f53acc9af
commit 360df90ba5

@ -378,6 +378,13 @@ class RemoteFilesystem
} }
} }
// Handle GitHub two factor tokens.
if (isset($options['github-otp'])) {
$headers[] = 'X-GitHub-OTP: ' . $options['github-otp'];
unset($options['github-otp']);
}
if (isset($options['http']['header']) && !is_array($options['http']['header'])) { if (isset($options['http']['header']) && !is_array($options['http']['header'])) {
$options['http']['header'] = explode("\r\n", trim($options['http']['header'], "\r\n")); $options['http']['header'] = explode("\r\n", trim($options['http']['header'], "\r\n"));
} }

Loading…
Cancel
Save