简体   繁体   English

如何使用Wicket(Java)到达原始的HTTP标头(用于基本身份验证)?

[英]How do I get to the raw http headers (for basic authentication) with Wicket (Java)?

I need to read the basic authentication headers (more specifically, just the username) in a Wicket (6.19) project. 我需要阅读Wicket(6.19)项目中的基本身份验证标头(更具体地说,只是用户名)。 I specifically don't want to actually authenticate in wicket, the Apache web server already does that. 我特别不想实际通过wicket进行身份验证,Apache Web服务器已经做到了。

So, essentially, how do I read raw HTTP headers on the server in a Wicket project ? 因此,从本质上讲, 我如何在Wicket项目中读取服务器上的原始HTTP标头

All my web searches so far proved fruitless... (they all deal either with the client side, or with how to do authentication inside Wicket)... and so did my attempts at trying it out for myself. 到目前为止,我所有的网络搜索都被证明是徒劳的……(它们全都与客户端有关,或者与Wicket内的身份验证方法有关)……我也尝试自己尝试一下。

Thanks! 谢谢!

您需要org.apache.wicket.request.http.WebRequest#getHeader(java.lang.String)

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

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