2 * Copyright (c) 2010-2024 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.salus.internal.rest;
15 import java.util.Objects;
17 import com.google.gson.annotations.SerializedName;
20 * @author Martin GrzeĊlowski - Initial contribution
22 public record AuthToken(@SerializedName("access_token") String accessToken,
23 @SerializedName("refresh_token") String refreshToken, @SerializedName("expires_in") Long expiresIn,
24 @SerializedName("role") String role) {
26 Objects.requireNonNull(accessToken, "accessToken cannot be null!");
27 Objects.requireNonNull(refreshToken, "refreshToken cannot be null!");
31 public String toString() {
32 return "AuthToken{" + "accessToken='<SECRET>'" + ", refreshToken='<SECRET>'" + ", expiresIn=" + expiresIn
33 + ", role='" + role + '\'' + '}';