changeset 1119:036efe7361c8

working on new auth for annotations.
author robcast
date Wed, 07 Nov 2012 11:22:29 +0100
parents f0474c1faaff
children 8bd10cd04169
files webapp/src/main/webapp/jquery/jquery.digilib.annotator.js
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.annotator.js	Tue Nov 06 18:24:39 2012 +0100
+++ b/webapp/src/main/webapp/jquery/jquery.digilib.annotator.js	Wed Nov 07 11:22:29 2012 +0100
@@ -277,6 +277,7 @@
      * Stores the token and loads annotations on success.
      */
     var loadAnnotationToken = function(data, password) {
+    	return;
         var settings = data.settings;
         var url = settings.annotationTokenUrl;
         var params = {'user': settings.annotationUser};
@@ -370,7 +371,16 @@
         	'Auth' : {
         		'token' : data.annotationToken,
         		'tokenUrl' : data.settings.annotationTokenUrl,
-        		'autoFetch' : true
+        		'autoFetch' : true,
+	            'requestMethod' : 'POST',
+	            'requestData' : {
+	            	'user': data.settings.annotationUser,
+	            	'password': data.annotationPassword
+	            },
+	            'unauthorizedCallback' : function (that) {
+	            	window.alert("401");
+	            	return false;
+	            }
         	},
         	'Permissions' : {
         		'user' : data.settings.annotationUser