Package com.groiss.servlet
Interface HttpAuth
- All Known Implementing Classes:
LDAPPasswdAuth
,PasswdAuth
public interface HttpAuth
The interface HttpdAuth defines the authentification interface,
application programmers can
provide their own class implementing their authentification policy.
-
Method Summary
Modifier and TypeMethodDescriptionThis method gets the parameters necessary for checking if the user is allowed to connect to the server.default void
This method can be used to overwrite the logout redirect.void
This method is called by the server, when authorization is required and the client must be requested for login information.
-
Method Details
-
sendLoginRequest
This method is called by the server, when authorization is required and the client must be requested for login information. It typically sends a HTML page containing a login form to the browser.- Parameters:
req
- the HTTP Requestres
- the HTTP Response, where the HTML-page must be written to.- Throws:
Exception
-
checkUser
This method gets the parameters necessary for checking if the user is allowed to connect to the server. If the user is not allowed to connect an exception containing the reason is thrown.- Parameters:
user
- a string determining the id of the user who wants to get connectedpasswd
- the password of the userclientAddr
- the ip-address of the client from which the user wants to connect- Throws:
Exception
-
logoutRedirect
This method can be used to overwrite the logout redirect. The default implementation does the following: If there is a file alllangs/logout.html, redirect uses this path, else web application root is used (../).- Parameters:
req
- the HTTP Requestres
- the HTTP Response, where the redirect is sent to- Throws:
Exception
-