jrun.servlet.security
Class WebAppSecurityService
jrun.servlet.security.WebAppSecurityService
- All Implemented Interfaces:
- ConfigurableServicePartitionMBean, java.io.Serializable, Service, ServiceMBean, ServicePartitionMBean, WebAppSecurity, WebAppSecurityServiceMBean
- public class WebAppSecurityService
- implements WebAppSecurity
Processes and stores security data for a web application. It parses the web.xml
and creates WebAppAuthenticationFactorys and SecurityFilters. It also finds
the JRunSecurityManager.
- Author:
- Brian Deitte
- See Also:
- Serialized Form
| Methods inherited from interface jrunx.kernel.ServiceMBean |
bind, getBindToJNDI, getDeactivated, getDomainName, getJRunService, getLogger, getName, getParentService, getServerName, requestServer, setBindToJNDI, setDeactivated, setDomainName, setName, setParentService, unbind |
WebAppSecurityService
public WebAppSecurityService()
start
public void start()
throws java.lang.Exception
- Specified by:
start in interface Service
getWebAppMetaData
public WebAppMetaData getWebAppMetaData()
- Specified by:
getWebAppMetaData in interface WebAppSecurityServiceMBean
getWebAppSecurity
public WebAppSecurity getWebAppSecurity()
- Specified by:
getWebAppSecurity in interface WebAppSecurityServiceMBean
requestBegin
public void requestBegin(javax.servlet.http.HttpServletRequest request)
- This method needs to be called once at the beginning of every request.
- Specified by:
requestBegin in interface WebAppSecurity
requestEnd
public void requestEnd()
- This method needs to be called once at the end every request.
- Specified by:
requestEnd in interface WebAppSecurity
isPrincipalInRole
public boolean isPrincipalInRole(java.security.Principal user,
java.lang.String role)
- Specified by:
isPrincipalInRole in interface WebAppSecurityServiceMBean
logoff
public void logoff(javax.servlet.http.HttpSession session,
java.lang.Object contextId)
- Specified by:
logoff in interface WebAppSecurityServiceMBean
authenticate
public AuthenticatedPrincipal authenticate(java.lang.String username,
java.lang.String password,
javax.servlet.http.HttpSession session)
throws java.lang.Exception
- Specified by:
authenticate in interface WebAppSecurityServiceMBean
isAuthorized
public boolean isAuthorized(java.security.Principal user,
java.util.Collection roleNames)
- Specified by:
isAuthorized in interface WebAppSecurityServiceMBean
setRuntimeContext
public void setRuntimeContext(AuthenticatedPrincipal user)
getSecurityFilters
public java.util.Iterator getSecurityFilters()
- Specified by:
getSecurityFilters in interface WebAppSecurity
addResource
protected WebResourceCollection addResource(java.lang.String resourceName,
java.util.Collection roles,
java.util.Collection methods,
java.lang.String transport)
getResource
public WebResourceCollection getResource(java.lang.String resourceName)
- Specified by:
getResource in interface WebAppSecurity
getLoginPage
public java.lang.String getLoginPage()
- Specified by:
getLoginPage in interface WebAppSecurityServiceMBean
getErrorPage
public java.lang.String getErrorPage()
- Specified by:
getErrorPage in interface WebAppSecurityServiceMBean
getServletRoleRefs
public java.util.Map getServletRoleRefs()
- Specified by:
getServletRoleRefs in interface WebAppSecurityServiceMBean
processSecurityData
protected void processSecurityData()
getSSL
public SSL getSSL()
- Specified by:
getSSL in interface WebAppSecurity
createSecurityFilters
protected void createSecurityFilters()
throws SecurityInitException
- Create the securityk filters from data in WebAppMetaData
sessionCreated
public void sessionCreated(javax.servlet.http.HttpSessionEvent event)
sessionDestroyed
public void sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
Copyright � 2002 Macromedia Corporation. All Rights Reserved.