-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhandler.js
50 lines (39 loc) · 1.49 KB
/
handler.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
'use strict';
module.exports.ping = (event, context, cb) => {
let response = {
statusCode: 200,
body: `all good in ${process.env.STAGE}`
};
context.succeed(response);
};
module.exports.authorizer = (event, context, cb) => {
/*
{
"type": "TOKEN",
"authorizationToken": "123",
"methodArn": "arn:aws:execute-api:us-east-1:....5.....:uxyeaewr96/patrick/GET/user"
}
*/
require('./lambda_functions/authorizer/authorizer')(event, context, cb);
};
module.exports.clientIdAuthorizer = (event, context, cb) => {
require('./lambda_functions/clientIdAuthorizer/clientIdAuthorizer')(event, context, cb);
};
module.exports.getSession = (event, context, cb) => {
require('./lambda_functions/getSession/getSession')(event, context, cb);
};
module.exports.createSession = (event, context, cb) => {
require('./lambda_functions/createSession/createSession')(event, context, cb);
};
module.exports.refreshSession = (event, context, cb) => {
require('./lambda_functions/refreshSession/refreshSession')(event, context, cb);
};
module.exports.deleteSession = (event, context, cb) => {
require('./lambda_functions/deleteSession/deleteSession')(event, context, cb);
};
module.exports.createUser = (event, context, cb) => {
require('./lambda_functions/createUser/createUser')(event, context, cb);
};
module.exports.getUser = (event, context, cb) => {
require('./lambda_functions/getUser/getUser')(event, context, cb);
};