API Docs for: 0.0.8
Show:

File: client/auth/redirect/api.js

  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. define([
  5. '../base/api',
  6. 'client/lib/constants',
  7. 'client/lib/options',
  8. 'client/lib/object'
  9. ], function (BaseBroker, Constants, Options, ObjectHelpers) {
  10. 'use strict';
  11. /**
  12. * Authenticate a user with the redirect flow.
  13. *
  14. * @class RedirectBroker
  15. * @extends BaseBroker
  16. * @constructor
  17. */
  18. function RedirectBroker(clientId, options) {
  19. BaseBroker.call(this, clientId, options);
  20. }
  21. RedirectBroker.prototype = Object.create(BaseBroker.prototype);
  22. ObjectHelpers.extend(RedirectBroker.prototype, {
  23. openFxa: function (fxaUrl) {
  24. this._window.location.href = fxaUrl;
  25. }
  26. });
  27. return RedirectBroker;
  28. });