Search code examples
javahttpwicketbasic-authentication

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. I specifically don't want to actually authenticate in wicket, the Apache web server already does that.

So, essentially, how do I read raw HTTP headers on the server in a Wicket project?

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.

Thanks!


Solution

  • You need org.apache.wicket.request.http.WebRequest#getHeader(java.lang.String)