UNPKG

935 BJavaScriptView Raw
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 */
19export default class CognitoRefreshToken {
20 /**
21 * Constructs a new CognitoRefreshToken object
22 * @param {string=} RefreshToken The JWT refresh token.
23 */
24 constructor({ RefreshToken } = {}) {
25 // Assign object
26 this.token = RefreshToken || '';
27 }
28
29 /**
30 * @returns {string} the record's token.
31 */
32 getToken() {
33 return this.token;
34 }
35}