]> git.basschouten.com Git - openhab-addons.git/blob
176bb3a69962801b25ad28cb6b88312ae97064a7
[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.zoneminder.internal.dto;
14
15 import com.google.gson.annotations.SerializedName;
16
17 /**
18  * The {@link AuthResponseDTO} represents the response to an authentication request.
19  * When authentication is enabled in Zoneminder, this object contains the access and
20  * refresh tokens, as well as the number of seconds until the tokens expire.
21  *
22  * @author Mark Hilbush - Initial contribution
23  */
24 public class AuthResponseDTO extends AbstractResponseDTO {
25
26     /**
27      * Access token to be used in all API calls
28      */
29     @SerializedName("access_token")
30     public String accessToken;
31
32     /**
33      * Number of seconds until the access token expires
34      */
35     @SerializedName("access_token_expires")
36     public String accessTokenExpires;
37
38     /**
39      * Refresh token to be used to request a new access token. A new access token
40      * should be requested slightly before it is about to expire
41      */
42     @SerializedName("refresh_token")
43     public String refreshToken;
44
45     /**
46      * Number of seconds until the refresh token expires
47      */
48     @SerializedName("refresh_token_expires")
49     public String refreshTokenExpires;
50
51     /**
52      * Zoneminder version number
53      */
54     @SerializedName("version")
55     public String version;
56
57     /**
58      * Zoneminder API version number
59      */
60     @SerializedName("apiversion")
61     public String apiVersion;
62 }