 				return keyset[val].join params[val].separator || ","
 			return keyset[val]
 
+	_createHeaders: (token, parameters) ->
+		headers = {}
+		headers["Accept"] = short_formats[token.format] || token.format if token.format
+		for name, value of token.headers
+			param = @_replaceParam value, @_params, {}, parameters
+			headers[name] = param if param
+
 	authorize: (provider, parameters, opts, callback) ->
 		@_setParams(provider.parameters)
 		@_setParams(provider.oauth1.parameters)
-		data =
+		newStateData =
 			key: opts.key,
 			provider: provider.provider,
 			redirect_uri: opts.redirect_uri,

			origin: opts.origin,
			options: opts.options,
			expire: 600
		dbstates.add data, (err, state) =>
			@_dbAddedCallback(err, state, provider, parameters, opts, callback)

	_dbAddedCallback: (err, state, provider, parameters, opts, callback) ->
		request_token = provider.oauth1.request_token
		query = {}
		if typeof opts.options?.request_token == 'object'

		query.oauth_token = responseParser.oauth_token
		url = @_replaceParam authorize.url, @_params, {}, parameters
		url += "?" + querystring.stringify query
		return url

	access_token: (state, req, callback) ->
		if not req.params.oauth_token && not req.params.error
