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.tesla.internal.protocol.sso;
15 import static org.openhab.binding.tesla.internal.TeslaBindingConstants.*;
18 * The {@link AuthorizationCodeExchangeRequest} is a datastructure to exchange
19 * the authorization code for an access token on the SSO endpoint
21 * @author Christian Güdel - Initial contribution
23 @SuppressWarnings("unused") // Unused fields must not be removed since they are used for serialization to JSON
24 public class AuthorizationCodeExchangeRequest {
25 private String grant_type = "authorization_code";
26 private String client_id = CLIENT_ID;
28 private String code_verifier;
29 private String redirect_uri = URI_CALLBACK;
31 public AuthorizationCodeExchangeRequest(String code, String codeVerifier) {
33 this.code_verifier = codeVerifier;