Lua User Store #11

Open
opened 3 years ago by malacoda · 1 comments
malacoda commented 3 years ago
Owner

User store implemented as a Lua module.

Parameters are:

  • file: Path to the Lua file.
  • params: Variables to be passed into Lua.

The Lua module will implement the following, which directly correspond to the UserStore trait:

  • get_user(username): return a User table, or nil
  • login(username, password): login the user, return a User table if success, nil on error
  • registration_available: return true if registration is available, false otherwise. Default implementation will return true if the register method is available.
  • register(username, password): registers a user, returns User struct if success, nil on error.
User store implemented as a Lua module. Parameters are: * `file`: Path to the Lua file. * `params`: Variables to be passed into Lua. The Lua module will implement the following, which directly correspond to the `UserStore` trait: * `get_user(username)`: return a `User` table, or `nil` * `login(username, password)`: login the user, return a `User` table if success, `nil` on error * `registration_available`: return `true` if registration is available, `false` otherwise. Default implementation will return `true` if the `register` method is available. * `register(username, password)`: registers a user, returns `User` struct if success, `nil` on error.
malacoda added this to the Phase I milestone 3 years ago
malacoda added the
user store
label 3 years ago
Poster
Owner

This will most likely supplant #8 (and maybe even #9 and #10 which themselves could have been implemented with #8) since the Lua module can massage the return value of the command (or web service etc) into a user struct.

This will most likely supplant #8 (and maybe even #9 and #10 which themselves could have been implemented with #8) since the Lua module can massage the return value of the command (or web service etc) into a user struct.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.