This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Xenres's profile picture

XenAuth

Started by Xenres, 01 June 2013 - 04:19 PM
Xenres #1
Posted 01 June 2013 - 06:19 PM
XenAuth

What is it?

A simple authentication system

Why?

Just a quick entry into LUA for computer craft as I expand out my ideas.

Implemented:

Very simple user and password verification system

TODO:

Add rednet support
- Need to encode data before sending over rednet
Build Authentication server
- Add checks based on username, password, and computer id
- Local access should allow for overrides, so this will need to be kept in a very secure location
- needs password encryption
Build account administration panel
- Should allow you to change passwords
- Should allow you to adjust who has permissions to your terminals

Even with all that still left to do, my initial boilerplate code should serve as a nice standalone app.

Please do read the code and change the configuration options to match your desires. Please keep in mind that this is my first ComputerCraft program, but I've got big ideas to look forward too in the future.

Here's the code:
http://pastebin.com/5bB8JEWV

You can install it with pastebin as well

>pastebin get 5bB8JEWV xenauth

Feel free to tweak it, and then rename it to startup so that it will automatically load when chunks get reloaded. I suggest keeping it on a disk until you are sure you don't want to run anything else. I may implement some breakout features as well, but for now, it's just outputs to redstone.
svdragster #2
Posted 02 June 2013 - 06:39 AM
When the terminal is blocked, you can just reboot the computer with Ctrl + R and its unblocked ;)/>
Xenres #3
Posted 04 June 2013 - 11:14 AM
yeah, and if you set it as an autostart, you can bypass it with a floppy. If you make it an autostart, rebooting doesn't present this issue.
svdragster #4
Posted 05 June 2013 - 02:41 PM
If the file is called 'startup', and after failing to login too often, the terminal gets blocked. But you can bypass it with rebooting.