@Service public class XmlRoleMap extends AbstractRoleMap
<role-map url="xml:path=WEB-INF/role-map.xml"/>
The format of the static file is as follows:
<role-map>
<role name="admin" user="Harry Potter"/>
...
</users>
| Modifier and Type | Class and Description |
|---|---|
static class |
XmlRoleMap.Role |
| Constructor and Description |
|---|
XmlRoleMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRole(XmlRoleMap.Role role)
Adds a user from the configuration.
|
Path |
getPath()
Gets the path to the XML file.
|
void |
init()
Initialize the XML authenticator.
|
java.lang.Boolean |
isUserInRole(java.lang.String roleName,
java.security.Principal user)
Returns the PasswordUser
|
void |
reload()
Reload the authenticator.
|
void |
setPath(Path path)
Sets the path to the XML file.
|
public void setPath(Path path)
public Path getPath()
public void addRole(XmlRoleMap.Role role)
<init user='Harry Potter:quidditch:user,webdav'/>
@PostConstruct public void init()
init in class AbstractRoleMappublic java.lang.Boolean isUserInRole(java.lang.String roleName,
java.security.Principal user)
public void reload()