changeset 1501:897941bd7f07

oauth authentication works for scroll-background and birdseye view too.
author robcast
date Fri, 01 Apr 2016 12:31:14 +0200
parents 90bc0c7664d5
children 0d5c86055c79
files webapp/src/main/webapp/jquery/jquery.digilib.oauth.js
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.oauth.js	Fri Apr 01 12:17:36 2016 +0200
+++ b/webapp/src/main/webapp/jquery/jquery.digilib.oauth.js	Fri Apr 01 12:31:14 2016 +0200
@@ -24,7 +24,9 @@
 /**
  * digilib OAuth / OpenID Connect plugin.
  * 
- * Switches Scaler into error-code mode and listens for image load errors.
+ * Provides "authenticate" login button.
+ * 
+ * Optionally switches Scaler into error-code mode and listens for image load errors.
  * When an error occurs, redirect browser to authentication URL.
  */
 (function($) {
@@ -169,6 +171,10 @@
         $.extend(digilib.buttons, buttons);
         // add "id_token" to Scaler parameters
         digilib.defaults.scalerParamNames.push('id_token');
+        digilib.defaults.previewImgParamNames.push('id_token');
+        if (digilib.defaults.birdDivParams != null) {
+            digilib.defaults.birdDivParams.push('id_token');
+        }
         
     };