@@ -68,8 +68,8 @@ def force_token_type!(token_type)
68
68
@forced_token_type = token_type . to_s
69
69
end
70
70
71
- def access_token! ( *args , & local_http_config )
72
- headers , params , http_client , options = authenticated_context_from ( *args , & local_http_config )
71
+ def access_token! ( *args )
72
+ headers , params , http_client , options = authenticated_context_from ( *args )
73
73
params [ :scope ] = Array ( options . delete ( :scope ) ) . join ( ' ' ) if options [ :scope ] . present?
74
74
params . merge! @grant . as_json
75
75
params . merge! options
@@ -78,12 +78,14 @@ def access_token!(*args, &local_http_config)
78
78
absolute_uri_for ( token_endpoint ) ,
79
79
Util . compact_hash ( params ) ,
80
80
headers
81
- )
81
+ ) do |req |
82
+ yield req if block_given?
83
+ end
82
84
end
83
85
end
84
86
85
- def revoke! ( *args , & local_http_config )
86
- headers , params , http_client , options = authenticated_context_from ( *args , & local_http_config )
87
+ def revoke! ( *args )
88
+ headers , params , http_client , options = authenticated_context_from ( *args )
87
89
88
90
params . merge! case
89
91
when access_token = options . delete ( :access_token )
@@ -111,7 +113,9 @@ def revoke!(*args, &local_http_config)
111
113
absolute_uri_for ( revocation_endpoint ) ,
112
114
Util . compact_hash ( params ) ,
113
115
headers
114
- )
116
+ ) do |req |
117
+ yield req if block_given?
118
+ end
115
119
end
116
120
end
117
121
@@ -126,9 +130,9 @@ def absolute_uri_for(endpoint)
126
130
_endpoint_ . to_s
127
131
end
128
132
129
- def authenticated_context_from ( *args , & local_http_config )
133
+ def authenticated_context_from ( *args )
130
134
headers , params = { } , { }
131
- http_client = Rack ::OAuth2 . http_client ( & local_http_config )
135
+ http_client = Rack ::OAuth2 . http_client
132
136
133
137
# NOTE:
134
138
# Using Array#extract_options! for backward compatibility.
0 commit comments