<legend id='JwFnK'><style id='JwFnK'><dir id='JwFnK'><q id='JwFnK'></q></dir></style></legend>

    <tfoot id='JwFnK'></tfoot>

    <small id='JwFnK'></small><noframes id='JwFnK'>

  1. <i id='JwFnK'><tr id='JwFnK'><dt id='JwFnK'><q id='JwFnK'><span id='JwFnK'><b id='JwFnK'><form id='JwFnK'><ins id='JwFnK'></ins><ul id='JwFnK'></ul><sub id='JwFnK'></sub></form><legend id='JwFnK'></legend><bdo id='JwFnK'><pre id='JwFnK'><center id='JwFnK'></center></pre></bdo></b><th id='JwFnK'></th></span></q></dt></tr></i><div id='JwFnK'><tfoot id='JwFnK'></tfoot><dl id='JwFnK'><fieldset id='JwFnK'></fieldset></dl></div>

    • <bdo id='JwFnK'></bdo><ul id='JwFnK'></ul>

      Yii2:为什么 User 类中的 auth 键是?

      Yii2: Why is the auth key in class User?(Yii2:为什么 User 类中的 auth 键是?)

        <tfoot id='VCzZI'></tfoot>

              <bdo id='VCzZI'></bdo><ul id='VCzZI'></ul>

              <small id='VCzZI'></small><noframes id='VCzZI'>

              <i id='VCzZI'><tr id='VCzZI'><dt id='VCzZI'><q id='VCzZI'><span id='VCzZI'><b id='VCzZI'><form id='VCzZI'><ins id='VCzZI'></ins><ul id='VCzZI'></ul><sub id='VCzZI'></sub></form><legend id='VCzZI'></legend><bdo id='VCzZI'><pre id='VCzZI'><center id='VCzZI'></center></pre></bdo></b><th id='VCzZI'></th></span></q></dt></tr></i><div id='VCzZI'><tfoot id='VCzZI'></tfoot><dl id='VCzZI'><fieldset id='VCzZI'></fieldset></dl></div>
              <legend id='VCzZI'><style id='VCzZI'><dir id='VCzZI'><q id='VCzZI'></q></dir></style></legend>
                <tbody id='VCzZI'></tbody>

                本文介绍了Yii2:为什么 User 类中的 auth 键是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                正如标题阐明了为什么在Yii2中引入了auth key?它的主要用途是什么以及它在身份验证中的用途是什么?

                As the title clarifies why is the auth key introduced in Yii2? What're it's main usages and how it is useful in authentication?

                推荐答案

                主要用途是通过 cookie 对用户进行身份验证.当您选择在登录时被记住时,这就是您被记住的方式.系统必须以某种方式识别和登录您.它可以将您的用户名和密码保存在 cookie 中(那是不安全的),或者它可以通过其他方式记住您.这是手段之一.登录到 Yii 应用程序后,查看它创建的 _identity cookie,您将看到 auth_key 是 cookie 的一部分.

                The main use is to authenticate the user by cookie. When you choose to be remembered at Login, this is how you are remembered. The system has to identify and login you somehow. It can either save your username and password in a cookie (that would be unsafe) or it can remember you by other means. This is one of the means. After you login into your Yii application take a look at the _identity cookie that it creates, You will see that the auth_key is part of the cookie.

                cookie 实际上记住了 $id、$authKey 和 $duration,idauth_key 组合比用户名/密码组合更安全.

                The cookie actually remembers the $id the $authKey and the $duration, an idauth_key combination is safer to remember then a username/password one.

                这篇关于Yii2:为什么 User 类中的 auth 键是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                1. <i id='Xt5JU'><tr id='Xt5JU'><dt id='Xt5JU'><q id='Xt5JU'><span id='Xt5JU'><b id='Xt5JU'><form id='Xt5JU'><ins id='Xt5JU'></ins><ul id='Xt5JU'></ul><sub id='Xt5JU'></sub></form><legend id='Xt5JU'></legend><bdo id='Xt5JU'><pre id='Xt5JU'><center id='Xt5JU'></center></pre></bdo></b><th id='Xt5JU'></th></span></q></dt></tr></i><div id='Xt5JU'><tfoot id='Xt5JU'></tfoot><dl id='Xt5JU'><fieldset id='Xt5JU'></fieldset></dl></div>
                    • <bdo id='Xt5JU'></bdo><ul id='Xt5JU'></ul>
                      <legend id='Xt5JU'><style id='Xt5JU'><dir id='Xt5JU'><q id='Xt5JU'></q></dir></style></legend>

                      <small id='Xt5JU'></small><noframes id='Xt5JU'>

                        <tbody id='Xt5JU'></tbody>
                      <tfoot id='Xt5JU'></tfoot>