public class PicketBoxAuthorizationModule extends Object implements AuthorizationModule
Simple Authorization Module that authorizes users with the configured roles Note:The roles need to be placed as a comma separated list of values.
Example:
<policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:security-config:5.0"
xmlns="urn:jboss:security-config:5.0"
xmlns:jbxb="urn:jboss:security-config:5.0">
<application-policy name = "test">
<authentication>
<login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required">
<module-option name = "name">1.1</module-option>
<module-option name = "succeed">true</module-option>
<module-option name = "throwEx">false</module-option>
</login-module>
</authentication>
<authorization>
<policy-module
code="org.picketbox.plugins.authorization.PicketBoxAuthorizationModule">
<module-option name="roles">validuser</module-option>
</policy-module>
</authorization>
</application-policy>
</policy>
| Constructor and Description |
|---|
PicketBoxAuthorizationModule() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort() |
int |
authorize(Resource resource) |
boolean |
commit() |
boolean |
destroy() |
void |
initialize(Subject subject,
CallbackHandler handler,
Map<String,Object> sharedState,
Map<String,Object> options,
RoleGroup roles)
Initialize the module
|
public boolean abort()
throws AuthorizationException
abort in interface AuthorizationModuleAuthorizationExceptionpublic int authorize(Resource resource)
authorize in interface AuthorizationModulepublic boolean commit()
throws AuthorizationException
commit in interface AuthorizationModuleAuthorizationExceptionpublic boolean destroy()
destroy in interface AuthorizationModulepublic void initialize(Subject subject, CallbackHandler handler, Map<String,Object> sharedState, Map<String,Object> options, RoleGroup roles)
initialize in interface AuthorizationModulesubject - the authenticated subjecthandler - CallbackHandlersharedState - state shared with other configured modulesoptions - options specified in the Configuration
for this particular moduleroles - Roles of the subjectCopyright © 2018 JBoss by Red Hat. All rights reserved.