3 $(document).ready(function () {
5 var headerGenerator = window.ohauth.headerGenerator({
6 consumer_key: OSM.oauth_consumer_key,
7 consumer_secret: OSM.oauth_consumer_secret,
8 token: OSM.oauth_token,
9 token_secret: OSM.oauth_token_secret
12 $.ajaxPrefilter(function(options, jqxhr) {
14 options.headers = options.headers || {};
15 options.headers.Authorization = headerGenerator(options.type, options.url, jqxhr.data);