什么是授权标头?它是如何使用的。与使用登录自定义编码有何不同
刚刚发现有一个请求头授权。想知道这个头有什么用。在jsp tomcat servlet环境下是如何使用的。它与普通的登录模块有何不同,普通的登录模块是用户在简单的 jsp 页面中输入用户名密码。页面如何传递授权标头。
Just found that there is a request header authorization. Want to know what is the use of this header. How is it used in the context of jsp tomcat servlet enviornment. How is it different from a normal login module, where user enters username password in a simple jsp page. How a page passes authorization header.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是HTTP 基本身份验证的一部分。这是最基本的身份验证方式。当您进入此类网站时,您将看到一个 90 年代风格的登录弹出窗口(看起来像 Javascript 警报),您可以在其中输入凭据。对于 Java EE servlet 容器,您可以通过容器管理的安全性来管理登录和角色。 Java EE 教程中也对此进行了描述,从 < 章节开始em>定义安全要求。
不用说,基于表单的身份验证为您提供了更多的设计自由度。您只需使用
This is part of HTTP Basic authentication. This is the most basic way of authentication. When you enter such a website, you will be provided a 90's-style login popup (which look like a Javascript alert) where you can enter the credentials. In case of a Java EE servletcontainer, you can manage the logins and roles by container managed security. This is described in Java EE tutorial as well, starting in the chapter Defining Security Requirements.
Needless to say that Form based authentication provides you more design freedom. You can just create a nice-looking HTML page with a
<form>
and let it submit toj_security_check
. This is described in the same tutorial as well.