]> git.basschouten.com Git - openhab-addons.git/blob
6573dfe7de8bec69a2ed4e1be0b072a6b5d05f6e
[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
19  * {@link org.openhab.binding.boschindego.internal.handler.BoschAccountHandler}
20  * when authorization state has changed and for notifying
21  * {@link org.openhab.binding.boschindego.internal.handler.BoschIndegoHandler}
22  * when authorization flow is completed.
23  *
24  * @author Jacob Laursen - Initial contribution
25  */
26 @NonNullByDefault
27 public interface AuthorizationListener {
28     /**
29      * Called upon successful OAuth authorization.
30      */
31     void onSuccessfulAuthorization();
32
33     /**
34      * Called upon failed OAuth authorization.
35      */
36     void onFailedAuthorization(Throwable throwable);
37
38     /**
39      * Called upon successful completion of OAuth authorization flow.
40      */
41     void onAuthorizationFlowCompleted();
42 }