Search code examples
umluse-case

How to create the authentification step in a UML use case diagram?


I am drawing a use case diagram for an Online Bill Payment and I am confused about the authentification step. Is it better to create separate use cases for a new user and for a registered user like I've tried below enter image description here

or should I create just a login use case and then extend the register, for example like this:enter image description here

or should I create an authentification use case and extend login, logout and register?


Solution

  • There are several approaches depending on expected system behavior and your writing style.

    • Use two different actors, authorised and non-authorised user. Write subfunction level login use case for non-authorised user. Let authorised user only to be an actor in user goal use cases like Check balance.
    • In all user goal level use cases write precondition that user is authorised. Write subfunction level login use case.
    • In all user goal level use cases write precondition that user session is valid. Write subfunction level use case where system checks session and enforces login use case when needed.

    Login, logout and registration (also session expiration) scenarios are not connected in the way you asking. You can, for example, tag them as AAA or put in AAA chapter/folder. There is no need to mix them in one scenario.