[英]Class Diagram for Authentication and Authorization Service
This is the scenario这是场景
The system has two main users the SYSTEM USER and END USER.系统有两个主要用户,SYSTEM USER 和END USER。 An end user is further divided into two users named CLIENT USER and INTERNET USER, client user is associated in database accessible account while internet user is not.最终用户进一步分为两个用户,名为 CLIENT USER 和 INTERNET USER,客户端用户关联到数据库可访问帐户,而 Internet 用户则不是。
All users are classified into different ROLES, And each role is associated with a set of accessible MODULES, and different modules contain different FUNCTIONS like view, add, edit and delete functions.所有的用户被划分为不同的角色,每个角色都与一组可访问的模块相关联,不同的模块包含不同的功能,如查看、添加、编辑和删除功能。
Different roles may be associated with different functions in modules.不同的角色可能与模块中的不同功能相关联。 Sample Super Admin role may access and do add edit delete function in user access module while Power User may only access it or view it.示例超级管理员角色可以在用户访问模块中访问和添加编辑删除功能,而高级用户只能访问或查看它。
When User logs-in the security service would authenticate the user with username and password.当用户登录时,安全服务将使用用户名和密码对用户进行身份验证。 If it is authenticated, it will look up the roles associated with the user and display the granted modules on screen for users to select for access.如果通过身份验证,它将查找与用户关联的角色并在屏幕上显示授予的模块供用户选择访问。
I have created a simple class diagram containing the fields or attributes per class, I am just not sure if it is correct, like the connectors or relationship implemented, the cardinality and the methods per class, I have only input the method for one class and that is for login (login()) method.我创建了一个简单的类图,其中包含每个类的字段或属性,我只是不确定它是否正确,例如实现的连接器或关系、每个类的基数和方法,我只输入了一个类的方法和即用于登录 (login()) 方法。
I can see a couple of things wrong with your model:我可以看到您的模型有一些问题:
I would do something like that :我会做这样的事情:
You get users who can login and who have different roles, when you execute a function (renamed service), the Service gets its module and request the module to check if the session user has the right to execute the Service.你得到可以登录的用户和不同角色的用户,当你执行一个函数(重命名的服务)时,服务获取它的模块并请求模块检查会话用户是否有权执行服务。
Does this help you ?这对你有帮助吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.