-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathconfig_sample.json
212 lines (211 loc) · 5.02 KB
/
config_sample.json
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
{
"public_port": 3000,
"private_port": 3001,
"internal_port": 3010,
"private_host": "localhost",
"public_url": "https://pro.example.com",
"authHeaderKey": "bearer ",
"accessToken": {
"cipherKey": "unsecureKey1",
"signKey": "unsecureKey2",
"expiration": 10
},
"refreshToken": {
"cipherKey": "unsecureKey3",
"signKey": "unsecureKey4",
"expiration": 60
},
"management": {
"clientId": "Cipher Layer User",
"clientSecret": "unsecureKey5"
},
"db": {
"conn": "mongodb://127.0.0.1:27017/cipherlayer?w=1"
},
"redis": {
"host": "127.0.0.1",
"port": 6379
},
"defaultEmailSender": "[email protected]",
"passThroughEndpoint": {
"path": "/api/profile",
"recoverPath": "/api/user/:email/password",
"username": "email",
"email": "email",
"password": "password"
},
"salesforce": {
"scope": [
"profile",
"id",
"email",
"address",
"phone",
"refresh_token",
"offline_access",
"api"
],
"clientId": "1a2b3c4d5e6f",
"clientSecret": "6f5e4d3c2b1a",
"callbackURL": "http://localhost:3000/auth/sf/callback",
"authUrl": "https://login.salesforce.com/services/oauth2/authorize",
"tokenUrl": "https://login.salesforce.com/services/oauth2/token",
"renewWhenLessThan": 1,
"expiration": 5,
"replaceDefaultAvatar": {
"defaultAvatar": "profilephoto/005/F",
"replacementAvatar": "https://_default_avatar.png"
}
},
"facebook": {
"registerByToken": true,
"requestFields": "name,email,picture",
"fieldsMap": {
"name": "fullname",
"email": "email"
}
},
"aws": {
"accessKeyId": "{{AWS_ACCESKEYID}}",
"secretAccessKey": "{{AWS_SECRETACCESKEY}}",
"region": "us-west-2",
"buckets": {
"avatars": "example-avatars"
}
},
"validators": {
"profile": {
"path": "",
"filename": "profile_create.json"
}
},
"phoneVerification": {
"pinSize": 4,
"attempts": 3,
"redis": {
"key": "user.{userId}.phone.{phone}",
"expireInSec": 300
},
"pinValidationEndpoints": [
{
"path": "/api/me/phones",
"method": "post",
"fields": {
"countryISO": "country",
"phoneNumber": "phone"
}
}
]
},
"emailVerification": {
"from": "[email protected]",
"subject": "Example email verification",
"body": "<p>Thanks for register into Example, here is a link to activate your account click</p> <p><a href='{link}' >here</a></p> <p>If you have any problems on this process, please contact <a href='mailto:[email protected]'>[email protected]</a> and we will be pleased to help you.</p>",
"compatibleEmailDevices": [
"*iPhone*",
"*iPad*",
"*iPod*",
"*Android*"
],
"nonCompatibleEmailMsg": "Your user has been created correctly, try to access to Example app in your device.",
"redis": {
"key": "user.{username}.transaction",
"expireInSec": 86400
},
"scheme": "my-scheme",
"redirectProtocol": "https",
"errOnUserExists" : true
},
"externalServices": {
"notifications": {
"base": "http://localhost:3002",
"pathEmail": "/api/notification/email"
}
},
"version": {
"header": "x-example-version",
"platforms": {
"test": {
"link": "http://testLink",
"1": true
}
},
"installPath": "/install",
"db": "mongodb://localhost/versionControl?w=1",
"errorStatusCode": 400,
"public": [
"/public/*"
]
},
"allowedDomains": [
"*@a.com",
"*@facebook.com"
],
"password": {
"algorithm": "aes-256-ctr",
"encryptPassword": "password",
"validateOldPassword": false,
"regexValidation": "(?=.*\\d)(?=.*[A-Z])(?=.*[a-z]).{8}",
"message": "Your password must be at least 8 characters and must contain at least one capital, one lower and one number.",
"generatedRegex": "([a-z]{2})([0-9]{2})([A-Z]{4})",
"from": "[email protected]",
"subject": "Recover Example User Password",
"body": "Here is your new password for accessing to your Example account, if you want, you can update it anytime from your edit profile screen. <p> __PASSWD__ <p> you can also click <a href='__LINK__' >here</a> from your mobile device to get in. If you receiver this email by error or you are sure you didn't requested it, please contact [email protected]"
},
"magicLink": {
"from": "[email protected]",
"subject": "Cipherlayer Magic Login",
"body": "Here is your magic link, please click <a href='__LINK__' >here</a>",
"scheme": "my-scheme"
},
"endpoints": [
{
"path": "\/api\/profile",
"methods": [
"POST",
"PUT"
],
"roles": [
"admin"
]
},
{
"path": "\/.*",
"methods": [
"GET",
"POST",
"PUT"
],
"roles": [
"user",
"admin"
]
}
],
"accessControlAllow": {
"headers": [
"x-mycomms-version",
"content-type",
"Authorization"
],
"origins": [
"http://localhost:3000"
]
},
"directProxyUrls": [
"\/upload$"
],
"allowedHeaders": [
"x-custom-header"
],
"publicEndpoints": [
"/public/*"
],
"redirectOnError": {
"enabled": false,
"default_url": "/errors/internal_error.html",
"internal_error": "/errors/internal_error.html",
"invalid_profile_data": "/errors/invalid_profile.html",
"user_creation_failed": "/errors/user_creation_failed.html"
}
}