 	_setParams: (parameters) ->
 		@_params[k] = v for k,v of parameters
 
-	_replace_param: (param, params, hard_params, keyset) ->
+	_replaceParam: (param, params, hard_params, keyset) ->
 		param = param.replace /\{\{(.*?)\}\}/g, (match, val) ->
 			return hard_params[val] || ""
 		return param.replace /\{(.*?)\}/g, (match, val) ->

			for extra in (provider.oauth1.authorize.extra||[])
				hard_params[extra] = req.params[extra] if req.params[extra]
			for name, value of access_token.query
				param = @_replace_param value, @_params, hard_params, parameters
				query[name] = param if param
			headers = {}
			headers["Accept"] = short_formats[access_token.format] || access_token.format if access_token.format
			for name, value of access_token.headers
				param = @_replace_param value, @_params, {}, parameters
				headers[name] = param if param
			options =
				url: @_replace_param access_token.url, @_params, hard_params, parameters
				method: access_token.method?.toUpperCase() || "POST"
				oauth:
					callback: query.oauth_callback

		if typeof opts.options?.request_token == 'object'
			query = opts.options.request_token
		for name, value of request_token.query
			param = @_replaceParam value, @_params, state:state.id, callback:config.host_url+config.relbase, parameters
			query[name] = param if param
		headers = {}
		headers["Accept"] = short_formats[request_token.format] || request_token.format if request_token.format
		for name, value of request_token.headers
			param = @_replaceParam value, @_params, {}, parameters
			headers[name] = param if param
		options =
			url: request_token.url
