简体   繁体   English

thinktecture IdentityServer“记住我”配置

[英]thinktecture IdentityServer “remember me” configuration

In the 'AuthenticationOptions', If i set true the propperty "RememberLastUsername", the username is always autocomplete with the previous username that i wrote in the login form. 在“ AuthenticationOptions”中,如果我将属性设置为“ RememberLastUsername”,则用户名始终使用我在登录表单中写入的先前用户名自动完成。 If i set the property to false, the username never remember the last username i wrote in the login form. 如果将属性设置为false,则用户名永远不会记住我在登录表单中写的最后一个用户名。

What i want is that login form can to remember the previous userName i wrote if i checked the "remember me" option in the login form, if i do not check that option i do no want that username is remembered next time i will log in. 我想要的是该登录表单可以记住我在登录表单中选中“记住我”选项时写的先前的用户名,如果我不选中该选项,则我不想在下次登录时记住该用户名。

It is possible with the identityServer properties? IdentityServer属性是否可能?

thanks in advance 提前致谢

Those are two different settings. 这是两个不同的设置。 The "RememberLastUsername" works as you described it -- it just is a convenience for pre-populating the username and it is implemented by issuing a cookie. “ RememberLastUsername”按您描述的方式工作-只是方便地预填充用户名,它是通过发布cookie来实现的。 This is a global setting and is unrelated to the "remember me" checkbox on the login page. 这是全局设置,与登录页面上的“记住我”复选框无关。

The "remember me" checkbox issues a persistent login cookie for the user and as such the user will no longer be take to the login page when an application makes login requests against IdentityServer. “记住我”复选框为用户发出一个持久的登录cookie,因此当应用程序对IdentityServer发出登录请求时,该用户将不再被带到登录页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM