net.sourceforge.guacamole.net.basic
Class AuthenticatingHttpServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
net.sourceforge.guacamole.net.basic.AuthenticatingHttpServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- Direct Known Subclasses:
- BasicGuacamoleTunnelServlet, BasicLogin, ConfigurationList
public abstract class AuthenticatingHttpServlet
- extends javax.servlet.http.HttpServlet
Abstract servlet which provides an authenticatedService() function that
is only called if the HTTP request is authenticated, or the current
HTTP session has already been authenticated.
Authorized configurations are retrieved using the authentication provider
defined in guacamole.properties. The authentication provider has access
to the request and session, in addition to any submitted username and
password, in order to authenticate the user.
All authorized configurations will be stored in the current HttpSession.
Success and failure are logged.
- Author:
- Michael Jumper
- See Also:
- Serialized Form
Method Summary |
protected abstract void |
authenticatedService(Map<String,net.sourceforge.guacamole.protocol.GuacamoleConfiguration> configs,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected Map<String,net.sourceforge.guacamole.protocol.GuacamoleConfiguration> |
getConfigurations(javax.servlet.http.HttpSession session)
Returns the configurations associated with the given session. |
protected net.sourceforge.guacamole.net.auth.Credentials |
getCredentials(javax.servlet.http.HttpSession session)
Returns the credentials associated with the given session. |
void |
init()
|
protected void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuthenticatingHttpServlet
public AuthenticatingHttpServlet()
init
public void init()
throws javax.servlet.ServletException
- Overrides:
init
in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
getCredentials
protected net.sourceforge.guacamole.net.auth.Credentials getCredentials(javax.servlet.http.HttpSession session)
- Returns the credentials associated with the given session.
- Parameters:
session
- The session to retrieve credentials from.
- Returns:
- The credentials associated with the given session.
getConfigurations
protected Map<String,net.sourceforge.guacamole.protocol.GuacamoleConfiguration> getConfigurations(javax.servlet.http.HttpSession session)
- Returns the configurations associated with the given session.
- Parameters:
session
- The session to retrieve configurations from.
- Returns:
- The configurations associated with the given session.
service
protected void service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
- Overrides:
service
in class javax.servlet.http.HttpServlet
- Throws:
IOException
javax.servlet.ServletException
authenticatedService
protected abstract void authenticatedService(Map<String,net.sourceforge.guacamole.protocol.GuacamoleConfiguration> configs,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Throws:
javax.servlet.ServletException
IOException
Copyright © 2013. All Rights Reserved.