Process Flow - Username/password authentication
Start Authentication
Send Username
Send Password
Server Checks Credentials
Access Granted
End
The device sends username and password to the server, which checks them and grants or denies access.
send(username) send(password) response = server.check(username, password) if response == 'OK': access = True else: access = False
| Step | Action | Data Sent | Server Response | Access Status |
|---|---|---|---|---|
| 1 | Send username | user123 | Waiting | Unknown |
| 2 | Send password | pass456 | Checking | Unknown |
| 3 | Server checks credentials | user123/pass456 | OK | Unknown |
| 4 | Set access based on response | N/A | OK | Granted |
| 5 | End process | N/A | N/A | Granted |
| Variable | Start | After Step 1 | After Step 2 | After Step 3 | After Step 4 | Final |
|---|---|---|---|---|---|---|
| username | None | user123 | user123 | user123 | user123 | user123 |
| password | None | None | pass456 | pass456 | pass456 | pass456 |
| response | None | None | None | OK | OK | OK |
| access | False | False | False | False | True | True |
Username/password authentication flow: 1. Device sends username. 2. Device sends password. 3. Server checks credentials. 4. Server responds OK or not. 5. Access granted if OK, denied otherwise.