]> git.basschouten.com Git - openhab-addons.git/blob
c5eadcd1ec355b33b5c1a1d16d527f8cba17b3bc
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.tesla.internal.protocol.sso;
14
15 import static org.openhab.binding.tesla.internal.TeslaBindingConstants.*;
16
17 /**
18  * The {@link AuthorizationCodeExchangeRequest} is a datastructure to exchange
19  * the authorization code for an access token on the SSO endpoint
20  *
21  * @author Christian Güdel - Initial contribution
22  */
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;
27     private String code;
28     private String code_verifier;
29     private String redirect_uri = URI_CALLBACK;
30
31     public AuthorizationCodeExchangeRequest(String code, String codeVerifier) {
32         this.code = code;
33         this.code_verifier = codeVerifier;
34     }
35 }