登录-注销实施 [英] Login-Logout implementation
问题描述
我想实现登录  ;,一旦我登录,凭据将被保存为永久数据,即使我终止了该应用程序并再次启动它也应该登录.只有退出后,系统才会提示我再次登录
I want to implement login wherein once I login the credentials will be saved as permanent data and even if I kill the app and start it again I should be logged in.Only If I logout I should be prompted to login again.
这如何实现.
请帮助.
推荐答案
有多种保存用户凭据的方法,包括纯文本格式或加密格式.签出以下线程 stackoverflow .
There are various ways to save user credentials, either in plain text or encrypted. Check out the following thread on stackoverflow.
关于登录/注销表单,您始终可以检查用户在启动时是否已通过身份验证.例如,在MainWindow.OnNavigatedTo中,如果不是,则重定向到登录表单.
Regarding the login/logout form, you can always check if user is authenticated on startup. For example, in MainWindow.OnNavigatedTo and redirect to login form if he is not.
欢呼
这篇关于登录-注销实施的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!