]> git.basschouten.com Git - openhab-addons.git/blob
252e7e5df003401768ac391bcb6f8be25ae2634f
[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.ecobee.internal.api;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * The {@link EcobeeAuthState} represents that steps in the Ecobee PIN
19  * authorization process.
20  *
21  * @author Mark Hilbush - Initial contribution
22  */
23 @NonNullByDefault
24 enum EcobeeAuthState {
25     /*
26      * This is the initial state. It indicates that an "authorize" API call is needed to get
27      * the Ecobee PIN.
28      */
29     NEED_PIN,
30
31     /*
32      * This state indicates that an Ecobee PIN request was successful, and that a "token" API
33      * call is needed to complete the authorization and get the refresh and access tokens. In
34      * order to get the tokens, the user must authorize the application by entering the PIN
35      * into the Ecobee web portal.
36      */
37     NEED_TOKEN,
38
39     /*
40      * This state indicates that the "authorize" and "token" steps were successful.
41      */
42     COMPLETE
43 }