2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.zoneminder.internal.dto;
15 import com.google.gson.annotations.SerializedName;
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.
22 * @author Mark Hilbush - Initial contribution
24 public class AuthResponseDTO extends AbstractResponseDTO {
27 * Access token to be used in all API calls
29 @SerializedName("access_token")
30 public String accessToken;
33 * Number of seconds until the access token expires
35 @SerializedName("access_token_expires")
36 public String accessTokenExpires;
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
42 @SerializedName("refresh_token")
43 public String refreshToken;
46 * Number of seconds until the refresh token expires
48 @SerializedName("refresh_token_expires")
49 public String refreshTokenExpires;
52 * Zoneminder version number
54 @SerializedName("version")
55 public String version;
58 * Zoneminder API version number
60 @SerializedName("apiversion")
61 public String apiVersion;