lib/nylas/resources/auth.rb in nylas-6.0.2 vs lib/nylas/resources/auth.rb in nylas-6.0.3

- old
+ new

@@ -116,11 +116,11 @@ # # @param config [Hash] Configuration for the query. # @return [String] Updated list of parameters, including those specific to admin # consent. def build_query_with_admin_consent(config) - params = build_query(config) + params = build_http_query(config) # Appends new params specific for admin consent. params[:provider] = "microsoft" params[:response_type] = "adminconsent" params[:credential_id] = config[:credential_id] if config[:credential_id] @@ -133,11 +133,11 @@ # @param config [Hash] Configuration for the query. # @param secret_hash [Hash] Hashed secret. # @return [String] Updated list of encoded parameters, including those specific # to PKCE. def build_query_with_pkce(config, secret_hash) - params = build_query(config) + params = build_http_query(config) # Appends new PKCE specific params. params[:code_challenge_method] = "s256" params[:code_challenge] = secret_hash @@ -149,19 +149,19 @@ # @param config [Hash] Configuration for the query. # @return [URI] List of components for the authentication URL. def url_auth_builder(config) builder = URI.parse(api_uri) builder.path = "/v3/connect/auth" - builder.query = URI.encode_www_form(build_query(config)).gsub(/\+/, "%20") + builder.query = URI.encode_www_form(build_http_query(config)).gsub(/\+/, "%20") builder end # Builds the query. # # @param config [Hash] Configuration for the query. # @return [Hash] List of parameters to encode in the query. - def build_query(config) + def build_http_query(config) params = { client_id: config[:client_id], redirect_uri: config[:redirect_uri], access_type: config[:access_type] || "online", response_type: "code"