]> git.basschouten.com Git - openhab-addons.git/blob
879ae7a7ec428509b844063818a6c02de377abaa
[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.windcentrale.internal.dto;
14
15 import java.util.LinkedHashMap;
16 import java.util.Map;
17
18 /**
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}.
21  *
22  * @author Wouter Born - Initial contribution
23  */
24 public class RespondToAuthChallengeRequest {
25
26     public String challengeName = "PASSWORD_VERIFIER";
27     public String clientId = "";
28     public Map<String, String> challengeResponses = new LinkedHashMap<>();
29
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);
37     }
38 }