I am writing a custom JAAS LoginModule and I am wondering how can I access the HTTP headers.
In the initialize method I get a callback handler but I didn't find out if from there I can for example access SlingHttpServletRequest.
The header values should be passed as part of the Credentials object. This can be done with a custom AuthenticationHandler.
Alternatively, you could store the current request in a ThreadLocal and access it from your LoginModule, but IMHO the code to do this isn't as clean.