@xube/kit-aws-auth-infrastructure 0.0.83 → 0.0.85
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/api/auth-api.js +6 -6
- package/dist/auth-management.js +1 -0
- package/package.json +7 -7
- package/src/api/auth-api.ts +14 -18
- package/src/auth-management.ts +1 -0
package/dist/api/auth-api.js
CHANGED
|
@@ -11,13 +11,13 @@ class AuthAPIManager extends constructs_1.Construct {
|
|
|
11
11
|
constructor(scope, id, props) {
|
|
12
12
|
super(scope, id);
|
|
13
13
|
this.authApi = new kit_aws_infrastructure_1.XubeRestAPI(scope, id + "xube-api", props);
|
|
14
|
-
const userSignUp = new signup_1.SignUpAPI(this, id +
|
|
15
|
-
name: props.name +
|
|
16
|
-
authAPI: this.authApi
|
|
14
|
+
const userSignUp = new signup_1.SignUpAPI(this, id + "-signup-api", {
|
|
15
|
+
name: (props.name ?? "auth") + "-signup",
|
|
16
|
+
authAPI: this.authApi,
|
|
17
17
|
});
|
|
18
|
-
const userLogIn = new login_1.LoginAPI(this, id +
|
|
19
|
-
name: props.name +
|
|
20
|
-
authAPI: this.authApi
|
|
18
|
+
const userLogIn = new login_1.LoginAPI(this, id + "-login-api", {
|
|
19
|
+
name: (props.name ?? "auth") + "-login",
|
|
20
|
+
authAPI: this.authApi,
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
}
|
package/dist/auth-management.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xube/kit-aws-auth-infrastructure",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.85",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/XubeLtd/dev-kit#readme",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@xube/kit-build": "^0.0.
|
|
20
|
+
"@xube/kit-build": "^0.0.85"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@xube/kit-aws": "^0.0.
|
|
24
|
-
"@xube/kit-aws-auth": "^0.0.
|
|
25
|
-
"@xube/kit-aws-infrastructure": "^0.0.
|
|
26
|
-
"@xube/kit-constants": "^0.0.
|
|
27
|
-
"@xube/kit-log": "^0.0.
|
|
23
|
+
"@xube/kit-aws": "^0.0.85",
|
|
24
|
+
"@xube/kit-aws-auth": "^0.0.85",
|
|
25
|
+
"@xube/kit-aws-infrastructure": "^0.0.85",
|
|
26
|
+
"@xube/kit-constants": "^0.0.85",
|
|
27
|
+
"@xube/kit-log": "^0.0.85",
|
|
28
28
|
"aws-cdk-lib": "^2.100.0",
|
|
29
29
|
"aws-lambda": "^1.0.7",
|
|
30
30
|
"constructs": "^10.3.0"
|
package/src/api/auth-api.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { XubeRestAPI, XubeRestAPIProps } from "@xube/kit-aws-infrastructure";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
CorsOptions,
|
|
4
|
+
IAuthorizer,
|
|
5
|
+
IDomainName,
|
|
6
|
+
RestApi,
|
|
7
|
+
} from "aws-cdk-lib/aws-apigateway";
|
|
3
8
|
import { ICertificate } from "aws-cdk-lib/aws-certificatemanager";
|
|
4
9
|
import { IUserPool } from "aws-cdk-lib/aws-cognito";
|
|
5
10
|
import { Construct } from "constructs";
|
|
@@ -15,28 +20,19 @@ interface AuthAPIProps extends XubeRestAPIProps {
|
|
|
15
20
|
export class AuthAPIManager extends Construct {
|
|
16
21
|
authApi: XubeRestAPI;
|
|
17
22
|
|
|
18
|
-
constructor(
|
|
19
|
-
scope: Construct,
|
|
20
|
-
id: string,
|
|
21
|
-
props: AuthAPIProps
|
|
22
|
-
) {
|
|
23
|
+
constructor(scope: Construct, id: string, props: AuthAPIProps) {
|
|
23
24
|
super(scope, id);
|
|
24
25
|
|
|
25
26
|
this.authApi = new XubeRestAPI(scope, id + "xube-api", props);
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
authAPI: this.authApi
|
|
28
|
+
const userSignUp = new SignUpAPI(this, id + "-signup-api", {
|
|
29
|
+
name: (props.name ?? "auth") + "-signup",
|
|
30
|
+
authAPI: this.authApi,
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
const userLogIn = new LoginAPI(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
name: props.name + '-login',
|
|
38
|
-
authAPI: this.authApi
|
|
39
|
-
}
|
|
40
|
-
);
|
|
33
|
+
const userLogIn = new LoginAPI(this, id + "-login-api", {
|
|
34
|
+
name: (props.name ?? "auth") + "-login",
|
|
35
|
+
authAPI: this.authApi,
|
|
36
|
+
});
|
|
41
37
|
}
|
|
42
38
|
}
|