"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Http/Client/Auth/Basic.php" between
cakephp-4.0.1.tar.gz and cakephp-4.0.2.tar.gz

About: CakePHP is a rapid development framework for PHP applications. Source code.

Basic.php  (cakephp-4.0.1):Basic.php  (cakephp-4.0.2)
skipping to change at line 43 skipping to change at line 43
* @return \Cake\Http\Client\Request The updated request. * @return \Cake\Http\Client\Request The updated request.
* @see https://www.ietf.org/rfc/rfc2617.txt * @see https://www.ietf.org/rfc/rfc2617.txt
*/ */
public function authentication(Request $request, array $credentials): Reques t public function authentication(Request $request, array $credentials): Reques t
{ {
if (isset($credentials['username'], $credentials['password'])) { if (isset($credentials['username'], $credentials['password'])) {
$value = $this->_generateHeader($credentials['username'], $credentia ls['password']); $value = $this->_generateHeader($credentials['username'], $credentia ls['password']);
$request = $request->withHeader('Authorization', $value); $request = $request->withHeader('Authorization', $value);
} }
/** @var \Cake\Http\Client\Request */
return $request; return $request;
} }
/** /**
* Proxy Authentication * Proxy Authentication
* *
* @param \Cake\Http\Client\Request $request Request instance. * @param \Cake\Http\Client\Request $request Request instance.
* @param array $credentials Credentials. * @param array $credentials Credentials.
* @return \Cake\Http\Client\Request The updated request. * @return \Cake\Http\Client\Request The updated request.
* @see https://www.ietf.org/rfc/rfc2617.txt * @see https://www.ietf.org/rfc/rfc2617.txt
*/ */
public function proxyAuthentication(Request $request, array $credentials): R equest public function proxyAuthentication(Request $request, array $credentials): R equest
{ {
if (isset($credentials['username'], $credentials['password'])) { if (isset($credentials['username'], $credentials['password'])) {
$value = $this->_generateHeader($credentials['username'], $credentia ls['password']); $value = $this->_generateHeader($credentials['username'], $credentia ls['password']);
$request = $request->withHeader('Proxy-Authorization', $value); $request = $request->withHeader('Proxy-Authorization', $value);
} }
/** @var \Cake\Http\Client\Request */
return $request; return $request;
} }
/** /**
* Generate basic [proxy] authentication header * Generate basic [proxy] authentication header
* *
* @param string $user Username. * @param string $user Username.
* @param string $pass Password. * @param string $pass Password.
* @return string * @return string
*/ */
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)