从休息请求中获取授权标头

发布于 2024-12-14 08:55:35 字数 186 浏览 3 评论 0原文

我正在使用凹槽框架。有人知道如何从请求中获取授权标头吗?

通常,要获取请求,我们会执行 $this->request ,但是如何提取表单中的 Authorization 标头

Authorization:Basic  jadfasdbaHGDWDSJDN==

I'm using the recess framework. Does somebody knows how to get the Authorization header from the request.

Normally, to get the request, we do $this->request, but how to extract the Authorization header which is in a form

Authorization:Basic  jadfasdbaHGDWDSJDN==

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

遗失的美好 2024-12-21 08:55:35

当请求到达服务器时,用户名和密码已经被解码,得到

$Username=$this->request->username;
$Password=$this->request->password;

When the request arrives at the server, the username and password is already decoded, to get the

$Username=$this->request->username;
$Password=$this->request->password;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文