You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-15Lines changed: 29 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
[Sugarizer](https://github.com/llaske/sugarizer) is the open source learning platform based on Sugar that began in the famous One Laptop Per Child project.
6
6
7
-
Sugarizer Server allows the deployment of Sugarizer on a local server, for example on a school server, so expose locally Sugarizer as a Web Application. Sugarizer Server can also be used to provide collaboration features for Sugarizer Application on the network. Sugarizer Server could be deployed in a Docker container or on any computer with Node.js 6+ and MongoDB 2.6+.
7
+
Sugarizer Server allows the deployment of Sugarizer on a local server, for example on a school server, so expose locally Sugarizer as a Web Application. Sugarizer Server can also be used to provide collaboration features for Sugarizer Application on the network. Sugarizer Server could be deployed in a Docker container or on any computer with Node.js 10+ and MongoDB 2.6+.
8
8
9
9
10
10
## Running Sugarizer Server
@@ -40,13 +40,20 @@ Following is the typical content of Sugarizer Server settings file:
40
40
port = 8080
41
41
42
42
[security]
43
-
min_password_size = 4
44
-
max_age = 172800000
45
-
https = false
46
-
certificate_file = ../server.crt
47
-
key_file = ../server.key
48
-
strict_ssl = false
49
-
no_signup_mode = false
43
+
min_password_size = 4
44
+
max_age = 172800000
45
+
max_age_TFA = 180000
46
+
https = false
47
+
certificate_file = ../server.crt
48
+
key_file = ../server.key
49
+
strict_ssl = false
50
+
no_signup_mode = false
51
+
service_name = Sugarizer Server
52
+
secret = super.sugarizer.server.key
53
+
54
+
[privacy]
55
+
consent_need = false
56
+
policy = https://sugarizer.org/policy.html
50
57
51
58
[client]
52
59
path = ../sugarizer/
@@ -84,12 +91,16 @@ The **[information]** section is for describing your server. It could be useful
84
91
85
92
The **[web]** section describes the settings of the node.js process. By default, the web server is on the port 8080.
86
93
87
-
The **[security]** section regroup security settings. `min_password_size` is the minimum number of characters for the password. `max_age` is the expiration time in milliseconds of a session with the client. At the expiration of the session, the client should reenter its password. Default time is 172800000 (48 hours). Parameters `https`, `certificate_file`, `key_file` and `strict_ssl` are explain above.
94
+
The **[security]** section regroup security settings. `min_password_size` is the minimum number of characters for the password. `max_age` is the expiration time in milliseconds of a session with the client. At the expiration of the session, the client should reenter its password. Default time is 172800000 (48 hours). Similarly, `max_age_TFA` is is the expiration time in milliseconds of a session with the client. At the expiration of the session, the client should reenter its password. The default time is 180000 (30 mins).Parameters `https`, `certificate_file`, `key_file` and `strict_ssl` are explain above.
88
95
It `no_signup_mode` is true, account creation is allowed only by an administrator or a teacher (no direct sign-up allowed by a student).
96
+
The `service_name` is the issuer parameter, a string value indicating the provider or service this account is associated with, URL-encoded according to [RFC 3986](http://tools.ietf.org/html/rfc3986).
97
+
The `secret` is the JWT Secret which is used to encrypt JSON Web Token. It should be replaced with a unique value to keep the SSP Server secure.
98
+
99
+
The **[privacy]** section describe privacy settings. When `consent_need` is set to true, the Sugarizer client will ask a consent to user before they will be allowed to do their first connection to the server. `policy` is the URL that Sugarizer client shown in consent popup displayed to user.
89
100
90
101
The **[client]** indicate the place where is located Sugarizer Client. Sugarizer Client is need by the server.
91
102
92
-
The **[presence]** section describes the settings of the presence server. By default, a web socket is created on port 8039. You need to change this value if you want to use another port.
103
+
The **[presence]** section describes the settings of the presence server. By default, a web socket is created on port 8039. You need to change this value if you want to use another port. You could use the same value than the one in the `web` port.
93
104
94
105
The **[database]** and **[collections]** sections are for MongoDB settings. You could update the server name (by default MongoDB run locally) and the server port. Names of the database and collections had no reason to be changed. The `waitdb` parameter allow you to force server to wait for the database. Optionally, the `replicaset` parameter can be set to `true` to enable MongoDB Replicaset support, in this case the server name becomes the replicaset connection string.
95
106
@@ -142,6 +153,7 @@ To implement the above functionalities, the sugarizer backend exposes an API. Th
142
153
#### USERS ROUTES
143
154
144
155
[POST] /auth/login
156
+
[POST] /auth/verify2FA
145
157
[POST] /auth/signup
146
158
[GET] /api/v1/users
147
159
[GET] /api/v1/users?name=tarun
@@ -198,6 +210,12 @@ To implement the above functionalities, the sugarizer backend exposes an API. Th
198
210
[POST] /api/v1/stats
199
211
[DELETE] /api/v1/stats
200
212
213
+
#### TWO FACTOR AUTHENTICATION ROUTES
214
+
215
+
[GET] /api/v1/dashboard/profile/enable2FA
216
+
[PUT] /api/v1/dashboard/profile/enable2FA
217
+
[PUT] /api/v1/dashboard/profile/disable2FA
218
+
201
219
202
220
A full documentation of the API is available in http://127.0.0.1:8080/docs.
203
221
@@ -290,11 +308,7 @@ Then launch Grunt task to minify Sugarizer JavaScript files:
290
308
291
309
grunt -v
292
310
293
-
After minification, the `build` directory will contain the optimized version of each file in the same directory as the initial one, so you could just copy files:
294
-
295
-
cp -r build/* .
296
-
297
-
Then navigate to Sugarizer-Server directory install the specific component for Sugarizer-Server by running:
311
+
Now navigate to Sugarizer-Server directory install the specific component for Sugarizer-Server by running:
0 commit comments