1 | /*!
|
2 | * Copyright 2016 Amazon.com,
|
3 | * Inc. or its affiliates. All Rights Reserved.
|
4 | *
|
5 | * Licensed under the Amazon Software License (the "License").
|
6 | * You may not use this file except in compliance with the
|
7 | * License. A copy of the License is located at
|
8 | *
|
9 | * http://aws.amazon.com/asl/
|
10 | *
|
11 | * or in the "license" file accompanying this file. This file is
|
12 | * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
13 | * CONDITIONS OF ANY KIND, express or implied. See the License
|
14 | * for the specific language governing permissions and
|
15 | * limitations under the License.
|
16 | */
|
17 |
|
18 | /** @class */
|
19 | var AuthenticationDetails = /*#__PURE__*/function () {
|
20 | /**
|
21 | * Constructs a new AuthenticationDetails object
|
22 | * @param {object=} data Creation options.
|
23 | * @param {string} data.Username User being authenticated.
|
24 | * @param {string} data.Password Plain-text password to authenticate with.
|
25 | * @param {(AttributeArg[])?} data.ValidationData Application extra metadata.
|
26 | * @param {(AttributeArg[])?} data.AuthParamaters Authentication paramaters for custom auth.
|
27 | */
|
28 | function AuthenticationDetails(data) {
|
29 | var _ref = data || {},
|
30 | ValidationData = _ref.ValidationData,
|
31 | Username = _ref.Username,
|
32 | Password = _ref.Password,
|
33 | AuthParameters = _ref.AuthParameters,
|
34 | ClientMetadata = _ref.ClientMetadata;
|
35 |
|
36 | this.validationData = ValidationData || {};
|
37 | this.authParameters = AuthParameters || {};
|
38 | this.clientMetadata = ClientMetadata || {};
|
39 | this.username = Username;
|
40 | this.password = Password;
|
41 | }
|
42 | /**
|
43 | * @returns {string} the record's username
|
44 | */
|
45 |
|
46 |
|
47 | var _proto = AuthenticationDetails.prototype;
|
48 |
|
49 | _proto.getUsername = function getUsername() {
|
50 | return this.username;
|
51 | }
|
52 | /**
|
53 | * @returns {string} the record's password
|
54 | */
|
55 | ;
|
56 |
|
57 | _proto.getPassword = function getPassword() {
|
58 | return this.password;
|
59 | }
|
60 | /**
|
61 | * @returns {Array} the record's validationData
|
62 | */
|
63 | ;
|
64 |
|
65 | _proto.getValidationData = function getValidationData() {
|
66 | return this.validationData;
|
67 | }
|
68 | /**
|
69 | * @returns {Array} the record's authParameters
|
70 | */
|
71 | ;
|
72 |
|
73 | _proto.getAuthParameters = function getAuthParameters() {
|
74 | return this.authParameters;
|
75 | }
|
76 | /**
|
77 | * @returns {ClientMetadata} the clientMetadata for a Lambda trigger
|
78 | */
|
79 | ;
|
80 |
|
81 | _proto.getClientMetadata = function getClientMetadata() {
|
82 | return this.clientMetadata;
|
83 | };
|
84 |
|
85 | return AuthenticationDetails;
|
86 | }();
|
87 |
|
88 | export { AuthenticationDetails as default }; |
\ | No newline at end of file |