theRAPTLab / meme

DEPRECATED as of 2024-05-21. Use `theRAPTLab/meme-2023` instead. MEME development framework, using Electron, Webpack, and Express to create an "appliance-style" app server to end users on a LAN. Migrated from GitLab June 2023.
MIT License
0 stars 2 forks source link

DISCUSSION: How to add Teacher Login #18

Open benloh opened 5 years ago

benloh commented 5 years ago

In GitLab by @daveseah on Oct 31, 2019, 13:29

After talking to Ben about it the app needs, I'm thinking it's fundamentally this:

BACKGROUND

Here's how the system currently works:

  1. A valid user token is submitted from a client. The token encodes the groupid and classroomid with the name, with some non-cryptographic hashing to make it possible to validate a legit user token from a made-up one.

  2. Once a student provides their user token, it is sent to URSYS NET into PKT_SessionLogin(), which validates the user token. If a valid token is received, an access key is generated and sent back to the client logging-in. The key is unique across connections, even ones with the same user login.

  3. This access key is validated ONLY by PMC Model, which is accessed through UR.DBQuery and UR.DBTryLock/DBTryRelease calls. If the key is missing or doesn't match, the calls fail.

  4. For all other accesses, the access key is currently not used.

TEACHER ACCESS

The commenting system is technically part of the PMC Model, which means for teachers to use it:

benloh commented 5 years ago

In GitLab by @daveseah on Oct 31, 2019, 13:59

I'm leaning toward creating an internal login table that generates teacher tokens based on the teachers data table. Otherwise they'd have to be manually created somewhere.

Modifications:

benloh commented 5 years ago

In GitLab by @daveseah on Oct 31, 2019, 17:47

I've made the following modifications:

GENERATING TEACHER TOKENS

CHECKING TEACHER LOGGED IN STATE

CHANGED FILES