]> git.basschouten.com Git - openhab-addons.git/blob
a57c1f4c439d64a830e4ddc659920c63abe4af39
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.boschindego.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * {@link} AuthorizationListener} is used for notifying {@link BoschAccountHandler}
19  * when authorization state has changed and for notifying {@link BoschIndegoHandler}
20  * when authorization flow is completed.
21  *
22  * @author Jacob Laursen - Initial contribution
23  */
24 @NonNullByDefault
25 public interface AuthorizationListener {
26     /**
27      * Called upon successful OAuth authorization.
28      */
29     void onSuccessfulAuthorization();
30
31     /**
32      * Called upon failed OAuth authorization.
33      */
34     void onFailedAuthorization(Throwable throwable);
35
36     /**
37      * Called upon successful completion of OAuth authorization flow.
38      */
39     void onAuthorizationFlowCompleted();
40 }