autologin.js 676 B

12345678910111213141516171819
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. ;(function(django_browserid) {
  5. 'use strict';
  6. // Mock out django_browserid functions so that they avoid calling
  7. // navigator.id functions.
  8. django_browserid.login = function autoLogin(requestArgs, next) {
  9. if (typeof requestArgs === 'string') {
  10. next = requestArgs;
  11. }
  12. return django_browserid.verifyAssertion('fake', next);
  13. };
  14. django_browserid.registerWatchHandlers = function() {};
  15. })(window.django_browserid);