Package uk.ac.warwick.sso.client
Class ShireServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- uk.ac.warwick.sso.client.ShireServlet
-
- All Implemented Interfaces:
java.io.Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class ShireServlet extends javax.servlet.http.HttpServletWhat on earth is a shire?
The shire, which is only used for new-mode SSO apps, is where Websignon sends its security assertion to say that a particular user has just successfully signed in.
After the user has signed in via Websignon, an auto-submitting form containing the security assertion is posted here, to the shire. The shire will do a few things:
- Check that the assertion is valid (not expired, properly signed)
- Extract a token out of the assertion
- Use the token to request the user's details from the Websignon Attribute Authority URL
- Set a Service Specific Cookie (SSC) to say this service is signed in
After this is done,
SSOClientFilterwill see the SSC and set up the current user in the request.ShireServlet should be defined in web.xml, and must be served over HTTPS. When your application is registered with SSO, the URL to your shire will be one of the pieces of information it knows about.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ShireServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description uk.ac.warwick.sso.client.ShireCommandcreateShireCommand(java.lang.String remoteAddress)protected voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)protected voiddoPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)uk.ac.warwick.sso.client.cache.UserCachegetCache()uk.ac.warwick.sso.client.SSOConfigurationgetConfig()java.lang.StringgetConfigSuffix()uk.ac.warwick.util.cache.Cache<java.lang.String,uk.ac.warwick.userlookup.User>getUserIdCache()voidinit(javax.servlet.ServletConfig ctx)voidsetCache(uk.ac.warwick.sso.client.cache.UserCache cache)voidsetConfig(uk.ac.warwick.sso.client.SSOConfiguration config)voidsetConfigSuffix(java.lang.String configSuffix)voidsetUserIdCache(uk.ac.warwick.util.cache.Cache<java.lang.String,uk.ac.warwick.userlookup.User> userIdCache)-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
doGet
protected final void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException- Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionjava.io.IOException
-
doPost
protected final void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, java.io.IOException- Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionjava.io.IOException
-
createShireCommand
public uk.ac.warwick.sso.client.ShireCommand createShireCommand(java.lang.String remoteAddress)
-
init
public final void init(javax.servlet.ServletConfig ctx) throws javax.servlet.ServletException- Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
getCache
public final uk.ac.warwick.sso.client.cache.UserCache getCache()
-
setCache
public final void setCache(uk.ac.warwick.sso.client.cache.UserCache cache)
-
getConfig
public final uk.ac.warwick.sso.client.SSOConfiguration getConfig()
-
setConfig
public final void setConfig(uk.ac.warwick.sso.client.SSOConfiguration config)
-
getConfigSuffix
public final java.lang.String getConfigSuffix()
-
setConfigSuffix
public final void setConfigSuffix(java.lang.String configSuffix)
-
getUserIdCache
public final uk.ac.warwick.util.cache.Cache<java.lang.String,uk.ac.warwick.userlookup.User> getUserIdCache()
-
setUserIdCache
public final void setUserIdCache(uk.ac.warwick.util.cache.Cache<java.lang.String,uk.ac.warwick.userlookup.User> userIdCache)
-
-