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.netatmo.internal.api.dto;
15 import java.util.List;
17 import org.openhab.binding.netatmo.internal.api.data.NetatmoConstants.Scope;
20 * This is the Access Token Response, a simple value-object holding the result of an Access Token Request, as
21 * provided by Netatmo API.
23 * @author Gaƫl L'hopital - Initial contribution
25 public final class AccessTokenResponse {
28 * The access token issued by the authorization server. It is used
29 * by the client to gain access to a resource.
32 private String accessToken;
35 * Number of seconds that this OAuthToken is valid for since the time it was created.
38 private long expiresIn;
41 * Refresh token is a string representing the authorization granted to
42 * the client by the resource owner. Unlike access tokens, refresh tokens are
43 * intended for use only with authorization servers and are never sent
44 * to resource servers.
47 private String refreshToken;
49 private List<Scope> scope;
51 public String getAccessToken() {
55 public long getExpiresIn() {
59 public String getRefreshToken() {
63 public List<Scope> getScope() {
68 public String toString() {
69 return "AccessTokenResponse [accessToken=" + accessToken + ", expiresIn=" + expiresIn + ", refreshToken="
70 + refreshToken + ", scope=" + scope + "]";