From 01677a564e1cad0d091788435785996250a9860c Mon Sep 17 00:00:00 2001 From: jeremykendall Date: Tue, 11 Oct 2016 22:27:24 -0500 Subject: [PATCH] Fix WWW-Authenticate entry in $headers array In this context the header name should be the array key and the header value the array value. --- src/Exception/OAuthServerException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exception/OAuthServerException.php b/src/Exception/OAuthServerException.php index 1d1336a5..6ffa0fb1 100644 --- a/src/Exception/OAuthServerException.php +++ b/src/Exception/OAuthServerException.php @@ -267,7 +267,7 @@ class OAuthServerException extends \Exception ) { $authScheme = 'Bearer'; } - $headers[] = 'WWW-Authenticate: ' . $authScheme . ' realm="OAuth"'; + $headers['WWW-Authenticate'] = $authScheme . ' realm="OAuth"'; } // @codeCoverageIgnoreEnd return $headers;