Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] programmatic basic auth

Hello Colleagues,

What is the correct way to perform programmatic basic authentication in Jetty?

My usecase is I want to implement a rest service which logs the user when passed a username and password. My service has its own specific contract to handle error situations, and is called with jquery ajaxRequest, so APIs which would mess with the servlet response such as javax.servlet.http.HttpServletRequest.authenticate(HttpServletResponse) are not an option.

Should I go ahead and use HttpServletRequest.login(String, String) , or is there a container-specific approach which is more appropriate?

Thanks in advance.

Bes Regards, Dimitar

Back to the top