rack-oauth2 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.2
|
@@ -15,9 +15,9 @@ module Rack
|
|
15
15
|
self.realm ||= DEFAULT_REALM
|
16
16
|
header = response.header['WWW-Authenticate'] = "#{scheme} realm=\"#{realm}\""
|
17
17
|
if ErrorMethods::DEFAULT_DESCRIPTION.keys.include?(error)
|
18
|
-
header << "
|
19
|
-
header << "
|
20
|
-
header << "
|
18
|
+
header << ",error=\"#{error}\""
|
19
|
+
header << ",error_description=\"#{description}\"" if description.present?
|
20
|
+
header << ",error_uri=\"#{uri}\"" if uri.present?
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
@@ -43,7 +43,7 @@ describe Rack::OAuth2::Server::Resource::Unauthorized do
|
|
43
43
|
status, header, response = error_with_scheme.finish
|
44
44
|
status.should == 401
|
45
45
|
header['Content-Type'].should == 'application/json'
|
46
|
-
header['WWW-Authenticate'].should == "Scheme realm=\"#{realm}\"
|
46
|
+
header['WWW-Authenticate'].should == "Scheme realm=\"#{realm}\",error=\"invalid_token\""
|
47
47
|
response.body.should == ['{"error":"invalid_token"}']
|
48
48
|
end
|
49
49
|
|
metadata
CHANGED