]> git.basschouten.com Git - openhab-addons.git/blob
98e7eb66b26e09c240cc92863499c54a26d623ee
[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 org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * The {@link AuthenticationResultResponse} is returned by Cognito after responding to an SRP challenge by a
19  * {@link RespondToAuthChallengeRequest} or when refreshing tokens using an {@link InitiateAuthRequest}.
20  *
21  * The refresh token is only provided as part of the SRP challenge response and will be empty when it is used to refresh
22  * tokens.
23  *
24  * @author Wouter Born - Initial contribution
25  */
26 @NonNullByDefault
27 public class AuthenticationResultResponse {
28
29     private static class AuthenticationResult {
30         public String accessToken = "";
31         public int expiresIn;
32         public String idToken = "";
33         public String refreshToken = "";
34         public String tokenType = "";
35     }
36
37     private AuthenticationResult authenticationResult = new AuthenticationResult();
38
39     public String getAccessToken() {
40         return authenticationResult.accessToken;
41     }
42
43     public int getExpiresIn() {
44         return authenticationResult.expiresIn;
45     }
46
47     public String getIdToken() {
48         return authenticationResult.idToken;
49     }
50
51     public String getRefreshToken() {
52         return authenticationResult.refreshToken;
53     }
54
55     public String getTokenType() {
56         return authenticationResult.tokenType;
57     }
58 }