-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented express application for running locally.
- Loading branch information
1 parent
9fcf0d4
commit df4ab4e
Showing
55 changed files
with
957 additions
and
137 deletions.
There are no files selected for viewing
File renamed without changes.
435 changes: 435 additions & 0 deletions
435
infrastructure/services/package-lock.json → backend/package-lock.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "carpal", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"test": "mocha './src/test/**/*.test.js'", | ||
"refresh-db": "node ./src/main/database/index.js", | ||
"refresh-test-db": "node ./src/test/database/refreshDatabase.js" | ||
}, | ||
"dependencies": { | ||
"body-parser": "^1.18.3", | ||
"express": "^4.16.3", | ||
"jsonschema": "^1.2.4", | ||
"jsonwebtoken": "^8.1.0", | ||
"moment": "^2.22.2", | ||
"mysql": "^2.15.0", | ||
"randomstring": "^1.1.5", | ||
"request": "^2.87.0", | ||
"uuid": "^3.2.1" | ||
}, | ||
"devDependencies": { | ||
"aws-sdk": "^2.250.1", | ||
"chai": "^4.1.2", | ||
"chai-exclude": "^1.0.9", | ||
"mocha": "^5.2.0" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDATCCAemgAwIBAgIJRppYVkre6ervMA0GCSqGSIb3DQEBCwUAMB4xHDAaBgNV | ||
BAMTE2NhcnBhbC5hdS5hdXRoMC5jb20wHhcNMTgwNjAyMDMyOTA5WhcNMzIwMjA5 | ||
MDMyOTA5WjAeMRwwGgYDVQQDExNjYXJwYWwuYXUuYXV0aDAuY29tMIIBIjANBgkq | ||
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqvdMuabJiGr2ntuurtTZB/Mu6GNVyBQN | ||
tnDWjktZIkPKqDiIyl2xxbufIpIw4qEQjOUlJDg4YSi8K9T/mCv+wRes65cjQcw2 | ||
x0TNlZtdZ6vG8luWVWLvNE+DjqmsdMIgiLNirdKzNL3Ku2VvuFFvwcBAmXsqORT8 | ||
LcLOE2etTqdPuBdC0sGzAMncf+3J+BxLoZNCpxJUsh1vbw6mz6/TJjGmmBzOC70o | ||
LyXX9K+OevsW0bLkZeOJZAsGxDWDJ8B31TOarzvko66IlGukUSmmcg/PPiWdBjp5 | ||
IHdjjSjKVdApVrZmltjR7glh3RswVrvqEKGa7dH62928alo2yi0zRwIDAQABo0Iw | ||
QDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTqR7LijtYwkBuqB8txw+TDugz+ | ||
6TAOBgNVHQ8BAf8EBAMCAoQwDQYJKoZIhvcNAQELBQADggEBAC9tL9V5NOs1OFkg | ||
wEzRynYByZZpij2YHhZmnJxuIhdHKBf2+/AXcq4zN78y97D6lfdXVueJrB5OSm3R | ||
6yhffgY7JSURIE96LfEjoh63Y7Viy1Pdk4A9aYWvpoAjlnIb+s3vg+13ChH4b5p5 | ||
m4w3hOU8jJV2VoGooiTAWeHJsUYUPsMLneVKV7wv8Wl7sgLvO+xeRKpa+Sc71Cym | ||
dLGt3NP+EP9zhFRPxpaCIW3rsMnEgSIuekFmVqzv7exMy+srY2V3p0uqiCHdjDQo | ||
ZoumDRlverqMTWICzZsCRRpT4XcM4NlUMLw+zkQtymmDJGIBkZ7pxF+OfQXLRCHr | ||
bOPxM6M= | ||
-----END CERTIFICATE----- | ||
-----BEGIN CERTIFICATE----- | ||
MIIDATCCAemgAwIBAgIJRppYVkre6ervMA0GCSqGSIb3DQEBCwUAMB4xHDAaBgNV | ||
BAMTE2NhcnBhbC5hdS5hdXRoMC5jb20wHhcNMTgwNjAyMDMyOTA5WhcNMzIwMjA5 | ||
MDMyOTA5WjAeMRwwGgYDVQQDExNjYXJwYWwuYXUuYXV0aDAuY29tMIIBIjANBgkq | ||
hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqvdMuabJiGr2ntuurtTZB/Mu6GNVyBQN | ||
tnDWjktZIkPKqDiIyl2xxbufIpIw4qEQjOUlJDg4YSi8K9T/mCv+wRes65cjQcw2 | ||
x0TNlZtdZ6vG8luWVWLvNE+DjqmsdMIgiLNirdKzNL3Ku2VvuFFvwcBAmXsqORT8 | ||
LcLOE2etTqdPuBdC0sGzAMncf+3J+BxLoZNCpxJUsh1vbw6mz6/TJjGmmBzOC70o | ||
LyXX9K+OevsW0bLkZeOJZAsGxDWDJ8B31TOarzvko66IlGukUSmmcg/PPiWdBjp5 | ||
IHdjjSjKVdApVrZmltjR7glh3RswVrvqEKGa7dH62928alo2yi0zRwIDAQABo0Iw | ||
QDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTqR7LijtYwkBuqB8txw+TDugz+ | ||
6TAOBgNVHQ8BAf8EBAMCAoQwDQYJKoZIhvcNAQELBQADggEBAC9tL9V5NOs1OFkg | ||
wEzRynYByZZpij2YHhZmnJxuIhdHKBf2+/AXcq4zN78y97D6lfdXVueJrB5OSm3R | ||
6yhffgY7JSURIE96LfEjoh63Y7Viy1Pdk4A9aYWvpoAjlnIb+s3vg+13ChH4b5p5 | ||
m4w3hOU8jJV2VoGooiTAWeHJsUYUPsMLneVKV7wv8Wl7sgLvO+xeRKpa+Sc71Cym | ||
dLGt3NP+EP9zhFRPxpaCIW3rsMnEgSIuekFmVqzv7exMy+srY2V3p0uqiCHdjDQo | ||
ZoumDRlverqMTWICzZsCRRpT4XcM4NlUMLw+zkQtymmDJGIBkZ7pxF+OfQXLRCHr | ||
bOPxM6M= | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
const moment = require('moment'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const jwt = require('jsonwebtoken'); | ||
|
||
function toBase64(value){ | ||
return Buffer.from(value).toString('base64') | ||
} | ||
|
||
class ExpressAuthApis { | ||
constructor(app) { | ||
this.app = app; | ||
this.app.get('/authorize', this.auth.bind(this)); | ||
this.app.get('/userinfo', this.userinfo.bind(this)); | ||
this.app.get('/authcheck', this.authcheck.bind(this)); | ||
this.app.get('/.well-known/jwks.json', this.wellKnown.bind(this)); | ||
} | ||
|
||
wellKnown(req, res) { | ||
let expiry = moment().add(100, 'd'); | ||
console.log(req.query); | ||
let jwks = fs.readFileSync(path.resolve(__dirname, '../../config/express/certs/jwks.json')); | ||
res.status(200).send(JSON.parse(jwks)); | ||
} | ||
|
||
auth(req, res) { | ||
let queryParams = req.query || {}; | ||
let nonce = queryParams.nonce; | ||
let state = queryParams.state; | ||
let expiry = moment().add(100, 'd'); | ||
let date = expiry.toDate(); | ||
let host = req.get('host'); | ||
|
||
let urls = { | ||
driver: this.extractUrl(queryParams, expiry, state, date, host, this._getDriver()), | ||
admin: this.extractUrl(queryParams, expiry, state, date, host, this._getAdmin()), | ||
falicitator: this.extractUrl(queryParams, expiry, state, date, host, this._getFacilitator()) | ||
}; | ||
|
||
let redirectNow = queryParams.loginAs ? `window.location = "${urls[queryParams.loginAs]}"` : ''; | ||
res.status(200).send(` | ||
<html> | ||
<script> | ||
const loginAsDriver = () => { window.location = "${urls.driver}" }; | ||
const loginAsFacilitator = () => { window.location = "${urls.falicitator}" }; | ||
const loginAsAdmin = () => { window.location = "${urls.admin}" }; | ||
document.cookie = "com.auth0.auth.${nonce}=${state};path=/"; ${redirectNow} | ||
</script> | ||
<div><button onclick="loginAsDriver()">Login as driver</button></div> | ||
<div><button onclick="loginAsFacilitator()">Login as facilitator</button></div> | ||
<div><button onclick="loginAsAdmin()">Login as admin</button></div> | ||
<html>`); | ||
} | ||
|
||
extractUrl(queryParams, expiry, state, date, host, userInfo) { | ||
let {accessToken, jwtToken} = this._authAs(queryParams, host, userInfo, expiry); | ||
let url = `${queryParams.redirect_uri}#access_token=${accessToken}&id_token=${jwtToken}&refresh_token=6789&state=${state}&expires_in=${date.getTime()}`; | ||
return url; | ||
} | ||
|
||
_authAs(queryParams, host, userInfo, expiry) { | ||
let payload = this._completeJWT(userInfo, host, expiry.toDate(), queryParams.nonce); | ||
|
||
let accessToken = userInfo.role; | ||
let cert = fs.readFileSync(path.resolve(__dirname, '../../config/express/certs/private.key')); | ||
let jwtToken = jwt.sign(payload, cert, {algorithm: 'RS256'}); | ||
return {accessToken, jwtToken}; | ||
} | ||
|
||
_completeJWT(data, host, expiryDate, nonce){ | ||
let result = { | ||
"nonce": nonce.replace("@", "~"), | ||
"iss": `https://${host}/`, | ||
"aud": '1234', | ||
"exp": expiryDate.getTime() / 1000, | ||
"nbf": new Date().getTime() / 1000, | ||
...this._uriBased(data, `https://${host}/`) | ||
}; | ||
return result; | ||
} | ||
|
||
_uriBased(data, uri){ | ||
let result = {}; | ||
Reflect.ownKeys(data).forEach(k => result[uri + k] = data[k]); | ||
return result; | ||
} | ||
|
||
_getDriver(uri){ | ||
let data = { | ||
"email": "[email protected]", | ||
"gender": "male", | ||
"car": "suv", | ||
"role": "driver" | ||
}; | ||
return uri ? this._uriBased(data, uri) : data; | ||
} | ||
|
||
_getAdmin(uri){ | ||
let data = { | ||
"email": "[email protected]", | ||
"gender": "male", | ||
"role": "admin" | ||
}; | ||
return uri ? this._uriBased(data, uri) : data; | ||
} | ||
|
||
_getFacilitator(uri){ | ||
let data = { | ||
"email": "[email protected]", | ||
"gender": "female", | ||
"role": "facilitator" | ||
}; | ||
return uri ? this._uriBased(data, uri) : data; | ||
} | ||
|
||
userinfo(req, res){ | ||
let uri = req.get('origin') + '/'; | ||
let tokens = (req.get('authorization') || '').split(' '); | ||
switch (tokens[1]){ | ||
case 'admin': | ||
return res.status(200).send(this._getAdmin(uri)); | ||
case 'facilitator': | ||
return res.status(200).send(this._getFacilitator(uri)); | ||
default: | ||
return res.status(200).send(this._getDriver(uri)); | ||
} | ||
} | ||
|
||
authcheck(req, res){ | ||
res.status(200).send({ name: 'Foo' }); | ||
} | ||
|
||
} | ||
|
||
module.exports = ExpressAuthApis; |
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIC9jCCAd4CCQDfAD2g+Y7RJzANBgkqhkiG9w0BAQsFADA9MQswCQYDVQQGEwJh | ||
dTEMMAoGA1UECAwDbnN3MQ8wDQYDVQQHDAZzeWRuZXkxDzANBgNVBAoMBmNhcnBh | ||
bDAeFw0xODA4MjYwODI0NDBaFw0xOTA4MjYwODI0NDBaMD0xCzAJBgNVBAYTAmF1 | ||
MQwwCgYDVQQIDANuc3cxDzANBgNVBAcMBnN5ZG5leTEPMA0GA1UECgwGY2FycGFs | ||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8HoBueljoBmBbe54tbu5 | ||
ge0SFtebybklIKvmghgqR/Busi4azNwtGYBvvA0Ibodi/OGFJPvH2L89RuwWpxvp | ||
Nb74NHEGlwN8QNq7jUSLrcgZ13zc9y4N030Xis4YNGO/dnsweGfqG/I3LjEl/ZJV | ||
fDf5c+cZvFep7Z3OaPz9UawE5MkCA+GT5hycTLYhLNu4ODQfTJu3YmMHI5J0GyaF | ||
+80Rj3vZ4XOwAgIlQk3uFVOrKswFvN/WM7HZTLwW6gX3SbG7LaCEE1toBoEtm3Nf | ||
vKq2QaAe1AcjXWGgF7UEjzZ0B1kkp/LyV/fJkMxeQL5r3pz8tBIJzH478t3IuU22 | ||
HQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBg5xdJx/0weyC5FXlc4i5cajs3ziEX | ||
oGr704AgK3A+DNPkNPy5ZwfG7Axz0PSzrLWRAWhjnAGC4x+AcdGJtkoZ6/RfbkVO | ||
s0cI7dYNLlGbBIwyiZnC36CtMYJ1blUBPZGF7hEdQER2Bq0yfgju9yr6YrpGwuUo | ||
Kwnsl/nj03MnwbUc75nIPZRDLJmx7QsoTJm5R88l3MjCqcD6xSA9pX9wugnfKCNq | ||
RRXV2ZRxiUsgAhcMEkyglYrawZ4gQi5Rp6/jNNjq0c5ARBYCjcZcBkk2buuKAZjv | ||
AkXAAT/3E01s3af3+XXTEkfTj4/f84FloutSUVqXuLgNIYEztS9fHVho | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"keys": [ | ||
{ | ||
"kty": "RSA", | ||
"n": "wkRco_VjxfT_Zp2FCN-WnKTls9GaoRpUcrvwukH65u-Q0R9JUdjJiUQHxCgkBAOzEmsIeeEYRW19-E3Yk7fYzftbaD5cC9nZyf3jA9fF9kbbnD2wPFtk2Go9g5-TtWVKB4r_dd9D88tNAfTpa4b20uh9Uj92E6H0-fw7ZSg4kkkMv7mb0utRtsERi8-6hAu_kv3b7aayryBYVxKwwgkuXJ0SHJ3A9o1XL74i8l6vuJdcgdfSM8Sn9GYFbezuAR6JBbTdi55kSYf06rJqiUH-1Ep3yRv7MgWwWe8W_T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HcmBqBQ", | ||
"dq": "tjsWSB-gYH4jUdwCMOv6Sx3Tbg3obeppJaf0PizHJaOEHHXj1FeRoj7t7oeNMBXHhtmeezDl2Xkgp3eQ_s8eirCjnsjFu68VagS2wJUBeWatH32l-TGoMtVVjyvExYzB7M-cTc8RDy6LU9vtn0b0sE7_2J30r8rCL0EfUokNawmESuNhulIXbqghcFKs6K5MEaBRzndS0zAbqlFDmCtRDjDVbXNH3wtuAssJLjTV24BEYdfyFWIzA3plbrmCUYMy_iSu1jivygb33SnxcVUM_RoEZUfXNYDfNaB5PHYcf5bPu0PtGPIZNuVNWNf6wbj74iBciXj_i8tT4qz_aE2xxQ", | ||
"qi": "6R57N1Qyk2GUPUGJ0Yz50c9ooK5basDNXIKnzYGmmqaZRRF-cMywIwiR5PbfIyAd6MuW4tIoEvvv3VGW6NszpH-c6YhRCFBW4kvuv4lzdKNHpRP57MuFJiXlBe0KKso4G4vMaEnsx7ifNsWVjzNWgmNx06avpng7VTdyZSFbxe_JVRNUbkN5WJtZsh-IXF9L9LMsEE05r-VGnsjAz9ShD9-R-_TUk4Wsqzhm-ILo0NNCHfsW_qvC7kdysRa96tncMeQ45xuj_BuG2l6p8gdIjvGDErvfG4JhrdY3kyX7G_dISH5Do1U8mkIJQ2I-Z49MAN5BrBHmpeCSt8b1KUHzYg", | ||
"alg": "RS256", | ||
"use": "sig" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDwegG56WOgGYFt | ||
7ni1u7mB7RIW15vJuSUgq+aCGCpH8G6yLhrM3C0ZgG+8DQhuh2L84YUk+8fYvz1G | ||
7BanG+k1vvg0cQaXA3xA2ruNRIutyBnX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l4nm1ceBiD7+fRBmoXXZoEJ0cfJmKhhwqaNOTdBy8Cw+MMR3U9GNW7vPRHX2 | ||
0egdXiXFX2gVyoLeQXfW/iZ9IozqaxrFYnZotSEb3aUeQnlfNGbxDlD1BQKBgQDG | ||
w6nLJdlhNXUSIFKnw7WKUEkfXPc4yVSaVXjb3O7T8W0s8MOD4zBVkJnCP1hH7wSy | ||
u354SCaNIekJZHs1XkRGeCYQkxes8yw0tgcU67taI9aYvPMgElDoPL0fq9HpkGPY | ||
/Mg5DRn1fAz3Dudf/OxNJKwlPxvxRprz7nxjZgnjTQKBgDfW/bjsMGn/XFodVsqS | ||
j3CcNLcIqRMw4fhiRTO6AfZL9wMhqglzt2uZuXibPz3+7aN/QeqRm1vWwjC+ckzK | ||
UUHDvbMJqBJ/Wj9bpeVifjxML8yRkhWnxlCmxWywyFNHToBaI0/1FT+jEsYfd1bE | ||
TX6ZfR8fcsygXYzco244LGmY | ||
-----END PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIIJKQIBAAKCAgEAwkRco/VjxfT/Zp2FCN+WnKTls9GaoRpUcrvwukH65u+Q0R9J | ||
UdjJiUQHxCgkBAOzEmsIeeEYRW19+E3Yk7fYzftbaD5cC9nZyf3jA9fF9kbbnD2w | ||
PFtk2Go9g5+TtWVKB4r/dd9D88tNAfTpa4b20uh9Uj92E6H0+fw7ZSg4kkkMv7mb | ||
0utRtsERi8+6hAu/kv3b7aayryBYVxKwwgkuXJ0SHJ3A9o1XL74i8l6vuJdcgdfS | ||
M8Sn9GYFbezuAR6JBbTdi55kSYf06rJqiUH+1Ep3yRv7MgWwWe8W/TRVYjGgbwJZ | ||
xTdjE3Js+hU8q8mp6/cQtgjJ9wY2EjiliYPV/Vv9v1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Gtja2KfhCVG/8u | ||
eqqLmK6Tx0Sw9okvc4+tUoYQYir7igASu37n8Q1V2eoMQx2Gik9J/ShCX+zRqAdy | ||
YGoFAoIBAQC2OxZIH6BgfiNR3AIw6/pLHdNuDeht6mklp/Q+LMclo4QcdePUV5Gi | ||
Pu3uh40wFceG2Z57MOXZeSCnd5D+zx6KsKOeyMW7rxVqBLbAlQF5Zq0ffaX5Magy | ||
1VWPK8TFjMHsz5xNzxEPLotT2+2fRvSwTv/YnfSvysIvQR9SiQ1rCYRK42G6Uhdu | ||
qCFwUqzorkwRoFHOd1LTMBuqUUOYK1EOMNVtc0ffC24CywkuNNXbgERh1/IVYjMD | ||
emVuuYJRgzL+JK7WOK/KBvfdKfFxVQz9GgRlR9c1gN81oHk8dhx/ls+7Q+0Y8hk2 | ||
5U1Y1/rBuPviIFyJeP+Ly1PirP9oTbHFAoIBAQDpHns3VDKTYZQ9QYnRjPnRz2ig | ||
rltqwM1cgqfNgaaapplFEX5wzLAjCJHk9t8jIB3oy5bi0igS++/dUZbo2zOkf5zp | ||
iFEIUFbiS+6/iXN0o0elE/nsy4UmJeUF7Qoqyjgbi8xoSezHuJ82xZWPM1aCY3HT | ||
pq+meDtVN3JlIVvF78lVE1RuQ3lYm1myH4hcX0v0sywQTTmv5UaeyMDP1KEP35H7 | ||
9NSThayrOGb4gujQ00Id+xb+q8LuR3KxFr3q2dwx5DjnG6P8G4baXqnyB0iO8YMS | ||
u98bgmGt1jeTJfsb90hIfkOjVTyaQglDYj5nj0wA3kGsEeal4JK3xvUpQfNi | ||
-----END RSA PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDCRFyj9WPF9P9mnYUI35acpOWz0ZqhGlRyu/C6Qfrm75DRH0lR2MmJRAfEKCQEA7MSawh54RhFbX34TdiTt9jN+1toPlwL2dnJ/eMD18X2RtucPbA8W2TYaj2Dn5O1ZUoHiv9130Pzy00B9OlrhvbS6H1SP3YTofT5/DtlKDiSSQy/uZvS61G2wRGLz7qEC7+S/dvtprKvIFhXErDCCS5cnRIcncD2jVcvviLyXq+4l1yB19IzxKf0ZgVt7O4BHokFtN2LnmRJh/TqsmqJQf7USnfJG/syBbBZ7xb9NFViMaBvAlnFN2MTcmz6FTyryanr9xC2CMn3BjYSOKWJg9X9W/2/U19YV/6Wh2p7Z4kJx9goUN6neZR5XilH9MnKltFa2VyfK4s15J4vi5ukdnyNYpaAcnmJl3Y7b6zXoH+0R9FnRwIRg2588ZtnM8azDpiuEon7aTECSufsUk8rc1cwjeKYQNDEKIQmXTsNmbkWD5xCwbgXuz9XwAbiz8FFNLoEEe0CQqm338bqfFYI5Yw92NNtcIcZ2HYiSu6Tin4CV69g24RuE7IbNLIcRzUmCy7y9I6Z9+HPD2vl1aMhn5/NZlMSHQ9kN5zVv7bcO/18eeqOq3HeCitGDxwq/m7YpL8l+FtCruW4JmPRjLyfpxOdhZvNvmbj580r4sNu6THRAQ== [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const CreateRideService = require('../rides/CreateRideService'); | ||
const ListRidesService = require('../rides/ListRidesService'); | ||
const DatabaseManager = require('../database/DatabaseManager'); | ||
const AwsLambdaRideApis = require('../rides/aws/AwsLambdaRideApis'); | ||
const databaseManager = new DatabaseManager(); | ||
|
||
const createRideService = new CreateRideService(databaseManager); | ||
const listRidesService = new ListRidesService(databaseManager); | ||
|
||
const rides = new AwsLambdaRideApis(createRideService, listRidesService); | ||
|
||
module.exports = { | ||
rides: rides | ||
}; |
Oops, something went wrong.