The request
“Create a UML class diagram for online banking authentication with users, accounts, roles, permissions, sessions, and authentication and authorization services.”
Then tryAdd multi-factor authentication to User.Add an audit log for authorization checks.
What is in this drawing
Read the decisions behind it.
01
Model a dedicated AuthenticationService class that returns a Session object upon successful authentication
02
Use composition for User-Session ownership (User *-- Session) to reflect strong lifecycle dependency
03
Separate AuthorizationService to handle permission checks, maintaining a clean dependency on User, Role, and Permission classes
Reusable for any web application requiring role-based access control and session management, especially where authentication and authorization are handled by distinct services.
More like this