public abstract class AuthenticatingHttpServlet
extends javax.servlet.http.HttpServlet
| Constructor and Description |
|---|
AuthenticatingHttpServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
authenticatedService(UserContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Function called after the credentials given in the request (if any)
are authenticated.
|
protected Credentials |
getCredentials(javax.servlet.http.HttpSession session)
Returns the credentials associated with the given session.
|
protected UserContext |
getUserContext(javax.servlet.http.HttpSession session)
Returns the UserContext associated with the given session.
|
protected boolean |
hasNewCredentials(javax.servlet.http.HttpServletRequest request)
Returns whether the request given has updated credentials.
|
void |
init() |
protected void |
service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicepublic void init()
throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprotected Credentials getCredentials(javax.servlet.http.HttpSession session)
session - The session to retrieve credentials from.protected UserContext getUserContext(javax.servlet.http.HttpSession session)
session - The session to retrieve UserContext from.protected boolean hasNewCredentials(javax.servlet.http.HttpServletRequest request)
request - The request to check for credentials.protected void service(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException,
javax.servlet.ServletException
service in class javax.servlet.http.HttpServletIOExceptionjavax.servlet.ServletExceptionprotected abstract void authenticatedService(UserContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws GuacamoleException
context - The current UserContext.request - The HttpServletRequest being serviced.response - An HttpServletResponse which controls the HTTP response
of this servlet.GuacamoleException - If an error occurs that interferes with the
normal operation of this servlet.Copyright © 2013. All rights reserved.