Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Latest commit

 

History

56 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Miti's Access Control

Archived project linked to MitiPortal


This two services are here because i want to be able to launch websites with access control and account informations.

There is MitiAuth and MitiAccount (I will refer to them as 'Auth and 'Account), they, when combine, are a modular access control solution, you can set up in the settings of either components, what types of users exists and what data they can hold in their account

'Auth

This component serves for the authentification, when you create the module, you can give multiple types of users, and creates the environement in the database you provided. With all theses types of users, you can create one with a login and a password, you can update to change your password and login, you can delete the account and you can log in.

When an user log in, they receive a JWTToken, in the module there exist a checkJWTtoken that ensures that the token is still good. in the token you can find the id of the user and its type. (To note, the login and the id of the user are different things, the id of the user is generated by the server ) When a user logs out, it gives an outdated token, when he tries to access the site or check his token, he will have the error "outdated token"

'Account

This component associates an 'Auth account and informations. Right now, it uses MitiSettings and you cant give every type of users different informations, but i will work on that, the goal is to create a MitiSettings the same for the 'Account' and the 'Auth, so you can juste input one big config file. At the end we want to be able to have different user info for different user types that is not supported right now An 'Account can only be created from a JWTtoken of a 'Auth user. So if you try to create a 'Account you need a 'Auth.

You can use 'Auth alone but if you want 'Account you need 'Auth

//TODO Create test if account doesnt exist

'Settings

'Settings is the object where all the 'Account and 'Auth specifications is setup, In here you have userTypes, and the user info table structure for the info table structure, you need to specify what MySQL format you want your data to be. //Todo implement different info table structure for different user types.s

About

Javascript modules to manage authentification, users, their informations and administration. Basically a wrapper over SQL to do simple tasks.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages