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.windcentrale.internal.dto;
15 import java.util.LinkedHashMap;
19 * The {@link RespondToAuthChallengeRequest} is sent to Cognito to respond to a user SRP {@link ChallengeResponse}.
20 * When the request is successful Cognito responds with a {@link AuthenticationResultResponse}.
22 * @author Wouter Born - Initial contribution
24 public class RespondToAuthChallengeRequest {
26 public String challengeName = "PASSWORD_VERIFIER";
27 public String clientId = "";
28 public Map<String, String> challengeResponses = new LinkedHashMap<>();
30 public RespondToAuthChallengeRequest(String clientId, String username, String passwordClaimSecretBlock,
31 String passwordClaimSignature, String timestamp) {
32 this.clientId = clientId;
33 challengeResponses.put("USERNAME", username);
34 challengeResponses.put("PASSWORD_CLAIM_SECRET_BLOCK", passwordClaimSecretBlock);
35 challengeResponses.put("PASSWORD_CLAIM_SIGNATURE", passwordClaimSignature);
36 challengeResponses.put("TIMESTAMP", timestamp);