1
0
Fork 0

Add GitHub OTP to request headers

pull/2577/head
Chris Smith 2014-01-10 16:07:26 +00:00
parent 3f53acc9af
commit 360df90ba5
1 changed files with 7 additions and 0 deletions

View File

@ -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'])) {
$options['http']['header'] = explode("\r\n", trim($options['http']['header'], "\r\n"));
}