mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 15:05:45 +01:00
added Validation rules
This commit is contained in:
16
backend/src/middleware/Validation/Authentication.md
Normal file
16
backend/src/middleware/Validation/Authentication.md
Normal file
@@ -0,0 +1,16 @@
|
||||
## Authentication
|
||||
|
||||
### \[ACTION: login\]
|
||||
* Requires valid email and password format
|
||||
* Server validates credentials before issuing token
|
||||
* Token and employee data stored in localStorage upon success
|
||||
|
||||
### \[ACTION: register\]
|
||||
* Requires email, password, and name
|
||||
* Role is optional during registration
|
||||
* Automatically logs in user after successful registration
|
||||
|
||||
### \[ACTION: access protected resources\]
|
||||
* Requires valid JWT token in Authorization header
|
||||
* Token is automatically retrieved from localStorage
|
||||
* Unauthorized requests (401) trigger automatic logout
|
||||
Reference in New Issue
Block a user