spec/support/helpers/url_helper.rb in doorkeeper-4.4.3 vs spec/support/helpers/url_helper.rb in doorkeeper-5.0.0.rc1
- old
+ new
@@ -3,12 +3,14 @@
parameters = {
code: options[:code],
client_id: options[:client_id] || (options[:client] ? options[:client].uid : nil),
client_secret: options[:client_secret] || (options[:client] ? options[:client].secret : nil),
redirect_uri: options[:redirect_uri] || (options[:client] ? options[:client].redirect_uri : nil),
- grant_type: options[:grant_type] || 'authorization_code'
- }
+ grant_type: options[:grant_type] || 'authorization_code',
+ code_verifier: options[:code_verifier],
+ code_challenge_method: options[:code_challenge_method]
+ }.reject { |_, v| v.blank? }
"/oauth/token?#{build_query(parameters)}"
end
def password_token_endpoint_url(options = {})
parameters = {
@@ -27,10 +29,12 @@
parameters = {
client_id: options[:client_id] || options[:client].uid,
redirect_uri: options[:redirect_uri] || options[:client].redirect_uri,
response_type: options[:response_type] || 'code',
scope: options[:scope],
- state: options[:state]
+ state: options[:state],
+ code_challenge: options[:code_challenge],
+ code_challenge_method: options[:code_challenge_method]
}.reject { |_, v| v.blank? }
"/oauth/authorize?#{build_query(parameters)}"
end
def refresh_token_endpoint_url(options = {})