com.atlassian.seraph.service
Class PathService
java.lang.Object
com.atlassian.seraph.service.PathService
- All Implemented Interfaces:
- Initable, SecurityService, java.io.Serializable
- public class PathService
- extends java.lang.Object
- implements SecurityService
Configures Seraph to require certain roles to access certain URL paths.
Single init-param 'config.file' which is the location of the XML config file.
Default value is '/seraph-paths.xml' (loaded from classpath - usually in /WEB-INF/classes)
Here's a sample of the XML config file. Path names must be unique
<seraph-paths>
<path name="admin">
<url-pattern>/secure/admin/*</url-pattern>
<role-name>administrators</role-name>
</path>
<path name="secured">
<url-pattern>/secure/*</url-pattern>
<role-name>users</role-name>
</path>
</seraph-paths>
- See Also:
- Serialized Form
Method Summary |
void |
destroy()
|
java.util.Set |
getRequiredRoles(javax.servlet.http.HttpServletRequest request)
|
java.util.Set |
getRequiredRoles(java.lang.String servletPath)
|
void |
init(java.util.Map params,
SecurityConfig config)
Init the service - configure it from the config file |
protected java.lang.String[] |
parseRoles(java.lang.String roleNames)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PathService
public PathService()
init
public void init(java.util.Map params,
SecurityConfig config)
- Init the service - configure it from the config file
- Specified by:
init
in interface Initable
parseRoles
protected java.lang.String[] parseRoles(java.lang.String roleNames)
destroy
public void destroy()
- Specified by:
destroy
in interface SecurityService
getRequiredRoles
public java.util.Set getRequiredRoles(javax.servlet.http.HttpServletRequest request)
- Specified by:
getRequiredRoles
in interface SecurityService
getRequiredRoles
public java.util.Set getRequiredRoles(java.lang.String servletPath)
Copyright © 2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.