Mittwoch, 26. Februar 2014

Sequence-Diagram: User wants to login with his credentials (username, password)

An "401 unauthorized" HTTP status code is sent back from server to browser, if there is no so called "bearer token" detected by OWIN cookie based middleware when the user tries to connect to the server the first time or did a logoff and refreshes his browser. The user agents client side code then will handle this issue and navigates the user to the login page. Because the authentication is working together with Web.API based AccountController in conjunction with a specific server side configuration there is no classic "302 - Redirect" HTTP status code like in ASP.NET MVC.

Because of the Single-Page-Application (SPA) - architecture a classic redirect to a new page is not appropriate but showing the container on the same page that contains all the login stuff to the user. This is actually controlled by JQuery resp. JavaScript.

At this point the user is enabled to perform a login with his credentials.

The sequence diagram shows the login process then:
 
 

Keine Kommentare:

Kommentar veröffentlichen