A recent project, Web version, WPF version, mobile version. The leader wants to integrate a ready-made certification system for the group, which is called the W4 authentication system.
The W4 certification system has the following features:
1, ready-made
2. It's a single sign-on system.
3, does not support oAuth2
4, is a web version of the authentication system, heavily dependent on the cookie
Web version Fortunately, there is no big problem, but the WPF version of these desktop programs, how to integrate with the web version of the authentication system?
If you look at Baidu, and other OAuth2 interface, found that there is a parameter, the name of the display, support a variety of access to the Web, desktop and many other ways. Because there is no research, the internet did not find any information, do not know how the specific.
In my project, I envision building a certified intermediary service that takes over the work between the client (including web-side, desktop-side, etc.) and the W4 authentication system. For clients, it is not known that there is a so-called W4 system. Similarly, for W4, we do not know what those clients are.
The desktop-specific login process is designed as follows:
0, Desktop is the WPF version, authentication intermediary is the web version
1, the desktop first with the authentication intermediary services to establish a connection, through the Socket.io
2, after establishing the connection, trigger event, desktop open a new window, inside is a webbrowser, open the Certification intermediary page
3, the certification intermediary steering W4. Make preparations before turning
4, login in W4, after success, authentication intermediary to W4 Read account information (W4 has related interface)
5, the certification intermediary related processing, the account information and access_token through the connection to send back to the desktop side
6, the desktop receives the data, closes the connection, the sign-in process ends
Desktop System Integration Web Authentication system scheme