@aws-amplify/core 6.9.4-websocket-event.29583bc.0 → 6.10.1-server-auth.d7bf87e.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Platform/version.js +1 -1
- package/dist/cjs/Platform/version.js.map +1 -1
- package/dist/esm/Platform/version.d.ts +1 -1
- package/dist/esm/Platform/version.mjs +1 -1
- package/dist/esm/Platform/version.mjs.map +1 -1
- package/dist/esm/adapterCore/serverContext/types/cookieStorage.d.ts +97 -1
- package/package.json +3 -4
- package/src/Platform/version.ts +1 -1
- package/src/adapterCore/serverContext/types/cookieStorage.ts +98 -1
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.version = void 0;
|
|
5
5
|
// generated by genversion
|
|
6
|
-
exports.version = '6.
|
|
6
|
+
exports.version = '6.13.1-server-auth.d7bf87e.0+d7bf87e';
|
|
7
7
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../src/Platform/version.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.version = void 0;\n// generated by genversion\nexports.version = '6.13.1-server-auth.d7bf87e.0+d7bf87e';\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC;AACzB;AACA,OAAO,CAAC,OAAO,GAAG,sCAAsC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.
|
|
1
|
+
export declare const version = "6.13.1-server-auth.d7bf87e.0+d7bf87e";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../../../src/Platform/version.ts"],"sourcesContent":["// generated by genversion\nexport const version = '6.13.1-server-auth.d7bf87e.0+d7bf87e';\n"],"names":[],"mappings":"AAAA;AACY,MAAC,OAAO,GAAG;;;;"}
|
|
@@ -1,4 +1,99 @@
|
|
|
1
|
-
|
|
1
|
+
interface CookieSerializeOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.3|Domain Set-Cookie attribute}. By default, no
|
|
4
|
+
* domain is set, and most clients will consider the cookie to apply to only
|
|
5
|
+
* the current domain.
|
|
6
|
+
*/
|
|
7
|
+
domain?: string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Specifies a function that will be used to encode a cookie's value. Since
|
|
10
|
+
* value of a cookie has a limited character set (and must be a simple
|
|
11
|
+
* string), this function can be used to encode a value into a string suited
|
|
12
|
+
* for a cookie's value.
|
|
13
|
+
*
|
|
14
|
+
* The default function is the global `encodeURIComponent`, which will
|
|
15
|
+
* encode a JavaScript string into UTF-8 byte sequences and then URL-encode
|
|
16
|
+
* any that fall outside of the cookie range.
|
|
17
|
+
*/
|
|
18
|
+
encode?(value: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Specifies the `Date` object to be the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.1|`Expires` `Set-Cookie` attribute}. By default,
|
|
21
|
+
* no expiration is set, and most clients will consider this a "non-persistent cookie" and will delete
|
|
22
|
+
* it on a condition like exiting a web browser application.
|
|
23
|
+
*
|
|
24
|
+
* *Note* the {@link https://tools.ietf.org/html/rfc6265#section-5.3|cookie storage model specification}
|
|
25
|
+
* states that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is
|
|
26
|
+
* possible not all clients by obey this, so if both are set, they should
|
|
27
|
+
* point to the same date and time.
|
|
28
|
+
*/
|
|
29
|
+
expires?: Date | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Specifies the boolean value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.6|`HttpOnly` `Set-Cookie` attribute}.
|
|
32
|
+
* When truthy, the `HttpOnly` attribute is set, otherwise it is not. By
|
|
33
|
+
* default, the `HttpOnly` attribute is not set.
|
|
34
|
+
*
|
|
35
|
+
* *Note* be careful when setting this to true, as compliant clients will
|
|
36
|
+
* not allow client-side JavaScript to see the cookie in `document.cookie`.
|
|
37
|
+
*/
|
|
38
|
+
httpOnly?: boolean | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Specifies the number (in seconds) to be the value for the `Max-Age`
|
|
41
|
+
* `Set-Cookie` attribute. The given number will be converted to an integer
|
|
42
|
+
* by rounding down. By default, no maximum age is set.
|
|
43
|
+
*
|
|
44
|
+
* *Note* the {@link https://tools.ietf.org/html/rfc6265#section-5.3|cookie storage model specification}
|
|
45
|
+
* states that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is
|
|
46
|
+
* possible not all clients by obey this, so if both are set, they should
|
|
47
|
+
* point to the same date and time.
|
|
48
|
+
*/
|
|
49
|
+
maxAge?: number | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.4|`Path` `Set-Cookie` attribute}.
|
|
52
|
+
* By default, the path is considered the "default path".
|
|
53
|
+
*/
|
|
54
|
+
path?: string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Specifies the `string` to be the value for the [`Priority` `Set-Cookie` attribute][rfc-west-cookie-priority-00-4.1].
|
|
57
|
+
*
|
|
58
|
+
* - `'low'` will set the `Priority` attribute to `Low`.
|
|
59
|
+
* - `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.
|
|
60
|
+
* - `'high'` will set the `Priority` attribute to `High`.
|
|
61
|
+
*
|
|
62
|
+
* More information about the different priority levels can be found in
|
|
63
|
+
* [the specification][rfc-west-cookie-priority-00-4.1].
|
|
64
|
+
*
|
|
65
|
+
* **note** This is an attribute that has not yet been fully standardized, and may change in the future.
|
|
66
|
+
* This also means many clients may ignore this attribute until they understand it.
|
|
67
|
+
*/
|
|
68
|
+
priority?: 'low' | 'medium' | 'high' | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Specifies the boolean or string to be the value for the {@link https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7|`SameSite` `Set-Cookie` attribute}.
|
|
71
|
+
*
|
|
72
|
+
* - `true` will set the `SameSite` attribute to `Strict` for strict same
|
|
73
|
+
* site enforcement.
|
|
74
|
+
* - `false` will not set the `SameSite` attribute.
|
|
75
|
+
* - `'lax'` will set the `SameSite` attribute to Lax for lax same site
|
|
76
|
+
* enforcement.
|
|
77
|
+
* - `'strict'` will set the `SameSite` attribute to Strict for strict same
|
|
78
|
+
* site enforcement.
|
|
79
|
+
* - `'none'` will set the SameSite attribute to None for an explicit
|
|
80
|
+
* cross-site cookie.
|
|
81
|
+
*
|
|
82
|
+
* More information about the different enforcement levels can be found in {@link https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7|the specification}.
|
|
83
|
+
*
|
|
84
|
+
* *note* This is an attribute that has not yet been fully standardized, and may change in the future. This also means many clients may ignore this attribute until they understand it.
|
|
85
|
+
*/
|
|
86
|
+
sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Specifies the boolean value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.5|`Secure` `Set-Cookie` attribute}. When truthy, the
|
|
89
|
+
* `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set.
|
|
90
|
+
*
|
|
91
|
+
* *Note* be careful when setting this to `true`, as compliant clients will
|
|
92
|
+
* not send the cookie back to the server in the future if the browser does
|
|
93
|
+
* not have an HTTPS connection.
|
|
94
|
+
*/
|
|
95
|
+
secure?: boolean | undefined;
|
|
96
|
+
}
|
|
2
97
|
export declare namespace CookieStorage {
|
|
3
98
|
type SetCookieOptions = Partial<Pick<CookieSerializeOptions, 'domain' | 'expires' | 'httpOnly' | 'maxAge' | 'sameSite' | 'secure' | 'path'>>;
|
|
4
99
|
type Cookie = {
|
|
@@ -29,3 +124,4 @@ export declare namespace CookieStorage {
|
|
|
29
124
|
delete(name: string): void;
|
|
30
125
|
}
|
|
31
126
|
}
|
|
127
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/core",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.1-server-auth.d7bf87e.0+d7bf87e",
|
|
4
4
|
"description": "Core category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -54,14 +54,13 @@
|
|
|
54
54
|
"@aws-sdk/types": "3.398.0",
|
|
55
55
|
"@smithy/util-hex-encoding": "2.0.0",
|
|
56
56
|
"@types/uuid": "^9.0.0",
|
|
57
|
-
"cookie": "^0.7.0",
|
|
58
57
|
"js-cookie": "^3.0.5",
|
|
59
58
|
"rxjs": "^7.8.1",
|
|
60
59
|
"tslib": "^2.5.0",
|
|
61
60
|
"uuid": "^9.0.0"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|
|
64
|
-
"@aws-amplify/react-native": "1.1.8-
|
|
63
|
+
"@aws-amplify/react-native": "1.1.8-server-auth.d7bf87e.0+d7bf87e",
|
|
65
64
|
"@types/js-cookie": "3.0.2",
|
|
66
65
|
"genversion": "^2.2.0",
|
|
67
66
|
"typescript": "5.0.2"
|
|
@@ -193,5 +192,5 @@
|
|
|
193
192
|
]
|
|
194
193
|
}
|
|
195
194
|
},
|
|
196
|
-
"gitHead": "
|
|
195
|
+
"gitHead": "d7bf87e72fe41fc9a9f3ff2b87943e6f28e9d87b"
|
|
197
196
|
}
|
package/src/Platform/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// generated by genversion
|
|
2
|
-
export const version = '6.
|
|
2
|
+
export const version = '6.13.1-server-auth.d7bf87e.0+d7bf87e';
|
|
@@ -1,7 +1,104 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
interface CookieSerializeOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.3|Domain Set-Cookie attribute}. By default, no
|
|
7
|
+
* domain is set, and most clients will consider the cookie to apply to only
|
|
8
|
+
* the current domain.
|
|
9
|
+
*/
|
|
10
|
+
domain?: string | undefined;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Specifies a function that will be used to encode a cookie's value. Since
|
|
14
|
+
* value of a cookie has a limited character set (and must be a simple
|
|
15
|
+
* string), this function can be used to encode a value into a string suited
|
|
16
|
+
* for a cookie's value.
|
|
17
|
+
*
|
|
18
|
+
* The default function is the global `encodeURIComponent`, which will
|
|
19
|
+
* encode a JavaScript string into UTF-8 byte sequences and then URL-encode
|
|
20
|
+
* any that fall outside of the cookie range.
|
|
21
|
+
*/
|
|
22
|
+
encode?(value: string): string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Specifies the `Date` object to be the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.1|`Expires` `Set-Cookie` attribute}. By default,
|
|
26
|
+
* no expiration is set, and most clients will consider this a "non-persistent cookie" and will delete
|
|
27
|
+
* it on a condition like exiting a web browser application.
|
|
28
|
+
*
|
|
29
|
+
* *Note* the {@link https://tools.ietf.org/html/rfc6265#section-5.3|cookie storage model specification}
|
|
30
|
+
* states that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is
|
|
31
|
+
* possible not all clients by obey this, so if both are set, they should
|
|
32
|
+
* point to the same date and time.
|
|
33
|
+
*/
|
|
34
|
+
expires?: Date | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Specifies the boolean value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.6|`HttpOnly` `Set-Cookie` attribute}.
|
|
37
|
+
* When truthy, the `HttpOnly` attribute is set, otherwise it is not. By
|
|
38
|
+
* default, the `HttpOnly` attribute is not set.
|
|
39
|
+
*
|
|
40
|
+
* *Note* be careful when setting this to true, as compliant clients will
|
|
41
|
+
* not allow client-side JavaScript to see the cookie in `document.cookie`.
|
|
42
|
+
*/
|
|
43
|
+
httpOnly?: boolean | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Specifies the number (in seconds) to be the value for the `Max-Age`
|
|
46
|
+
* `Set-Cookie` attribute. The given number will be converted to an integer
|
|
47
|
+
* by rounding down. By default, no maximum age is set.
|
|
48
|
+
*
|
|
49
|
+
* *Note* the {@link https://tools.ietf.org/html/rfc6265#section-5.3|cookie storage model specification}
|
|
50
|
+
* states that if both `expires` and `maxAge` are set, then `maxAge` takes precedence, but it is
|
|
51
|
+
* possible not all clients by obey this, so if both are set, they should
|
|
52
|
+
* point to the same date and time.
|
|
53
|
+
*/
|
|
54
|
+
maxAge?: number | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.4|`Path` `Set-Cookie` attribute}.
|
|
57
|
+
* By default, the path is considered the "default path".
|
|
58
|
+
*/
|
|
59
|
+
path?: string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Specifies the `string` to be the value for the [`Priority` `Set-Cookie` attribute][rfc-west-cookie-priority-00-4.1].
|
|
62
|
+
*
|
|
63
|
+
* - `'low'` will set the `Priority` attribute to `Low`.
|
|
64
|
+
* - `'medium'` will set the `Priority` attribute to `Medium`, the default priority when not set.
|
|
65
|
+
* - `'high'` will set the `Priority` attribute to `High`.
|
|
66
|
+
*
|
|
67
|
+
* More information about the different priority levels can be found in
|
|
68
|
+
* [the specification][rfc-west-cookie-priority-00-4.1].
|
|
69
|
+
*
|
|
70
|
+
* **note** This is an attribute that has not yet been fully standardized, and may change in the future.
|
|
71
|
+
* This also means many clients may ignore this attribute until they understand it.
|
|
72
|
+
*/
|
|
73
|
+
priority?: 'low' | 'medium' | 'high' | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Specifies the boolean or string to be the value for the {@link https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7|`SameSite` `Set-Cookie` attribute}.
|
|
76
|
+
*
|
|
77
|
+
* - `true` will set the `SameSite` attribute to `Strict` for strict same
|
|
78
|
+
* site enforcement.
|
|
79
|
+
* - `false` will not set the `SameSite` attribute.
|
|
80
|
+
* - `'lax'` will set the `SameSite` attribute to Lax for lax same site
|
|
81
|
+
* enforcement.
|
|
82
|
+
* - `'strict'` will set the `SameSite` attribute to Strict for strict same
|
|
83
|
+
* site enforcement.
|
|
84
|
+
* - `'none'` will set the SameSite attribute to None for an explicit
|
|
85
|
+
* cross-site cookie.
|
|
86
|
+
*
|
|
87
|
+
* More information about the different enforcement levels can be found in {@link https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-4.1.2.7|the specification}.
|
|
88
|
+
*
|
|
89
|
+
* *note* This is an attribute that has not yet been fully standardized, and may change in the future. This also means many clients may ignore this attribute until they understand it.
|
|
90
|
+
*/
|
|
91
|
+
sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Specifies the boolean value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.5|`Secure` `Set-Cookie` attribute}. When truthy, the
|
|
94
|
+
* `Secure` attribute is set, otherwise it is not. By default, the `Secure` attribute is not set.
|
|
95
|
+
*
|
|
96
|
+
* *Note* be careful when setting this to `true`, as compliant clients will
|
|
97
|
+
* not send the cookie back to the server in the future if the browser does
|
|
98
|
+
* not have an HTTPS connection.
|
|
99
|
+
*/
|
|
100
|
+
secure?: boolean | undefined;
|
|
101
|
+
}
|
|
5
102
|
|
|
6
103
|
export declare namespace CookieStorage {
|
|
7
104
|
export type SetCookieOptions = Partial<
|