mobile/android/base/fxa/authenticator/FxAccountLoginDelegate.java

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mobile/android/base/fxa/authenticator/FxAccountLoginDelegate.java	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,26 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +package org.mozilla.gecko.fxa.authenticator;
     1.9 +
    1.10 +/**
    1.11 + * Abstraction around things that might need to be signalled to the user via UI,
    1.12 + * such as:
    1.13 + * <ul>
    1.14 + * <li>account not yet verified;</li>
    1.15 + * <li>account password needs to be updated;</li>
    1.16 + * <li>account key management required or changed;</li>
    1.17 + * <li>auth protocol has changed and Firefox needs to be upgraded;</li>
    1.18 + * </ul>
    1.19 + * etc.
    1.20 + * <p>
    1.21 + * Consumers of this code should differentiate error classes based on the types
    1.22 + * of the exceptions thrown. Exceptions that do not have special meaning are of
    1.23 + * type <code>FxAccountLoginException</code> with an appropriate
    1.24 + * <code>cause</code> inner exception.
    1.25 + */
    1.26 +public interface FxAccountLoginDelegate {
    1.27 +  public void handleError(FxAccountLoginException e);
    1.28 +  public void handleSuccess(String assertion);
    1.29 +}

mercurial