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.homeconnect.internal.client.model;
15 import java.util.Date;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
22 * @author Jonas BrĂ¼stel - Initial contribution
28 private final String accessToken;
29 private final String refreshToken;
30 private final long accessTokenExpirationInSeconds;
32 public Token(String accessToken, String refreshToken, long accessTokenExpirationInSeconds) {
33 this.accessToken = accessToken;
34 this.refreshToken = refreshToken;
35 this.accessTokenExpirationInSeconds = accessTokenExpirationInSeconds;
38 public String getAccessToken() {
42 public String getRefreshToken() {
46 public long getAccessTokenExpiration() {
47 return accessTokenExpirationInSeconds;
51 public String toString() {
52 return "Token [accessToken=" + accessToken + ", refreshToken=" + refreshToken + ", accessTokenExpiration="
53 + new Date(accessTokenExpirationInSeconds) + "]";