|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.seam.security.SeamSecurityManager
@Startup(depends="org.jboss.seam.security.securityConfiguration") @Scope(value=APPLICATION) @Name(value="org.jboss.seam.securityManager") @Install(value=false, precedence=0) @Intercept(value=NEVER) public class SeamSecurityManager
Holds configuration settings and provides functionality for the security API
| Constructor Summary | |
|---|---|
SeamSecurityManager()
|
|
| Method Summary | |
|---|---|
CallbackHandler |
createCallbackHandler(String username,
String password)
Creates a callback handler that can handle a standard username/password callback, using the specified username and password parameters. |
LoginContext |
createLoginContext()
Creates a LoginContext without a callback handler |
LoginContext |
createLoginContext(String policyName)
Creates a LoginContext using a configuration specified by name. |
LoginContext |
createLoginContext(String policyName,
CallbackHandler cbHandler)
A factory method for creating a LoginContext instance. |
boolean |
evaluateExpression(String expr)
Evaluates the specified security expression, which must return a boolean value. |
static boolean |
hasPermission(String name,
String action,
Object... args)
Performs a permission check for the specified name and action |
static boolean |
hasRole(String name)
Checks if the authenticated Identity is a member of the specified role. |
void |
initSecurityManager()
Initialise the security manager |
static SeamSecurityManager |
instance()
Returns the application-scoped instance of the security manager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SeamSecurityManager()
| Method Detail |
|---|
@Create public void initSecurityManager() throws Exception
Exceptionpublic static SeamSecurityManager instance()
public boolean evaluateExpression(String expr) throws AuthorizationException
expr - String The expression to evaluate
AuthorizationExceptionpublic static boolean hasRole(String name)
name - String The name of the role to check
public static boolean hasPermission(String name, String action, Object... args)
name - String The permission nameaction - String The permission actionargs - Object[] Optional number of objects used to make a permission decision
public LoginContext createLoginContext() throws LoginException
LoginExceptionpublic LoginContext createLoginContext(String policyName) throws LoginException
policyName - The name of the security configuration policy to use
LoginExceptionpublic LoginContext createLoginContext(String policyName, CallbackHandler cbHandler) throws LoginException
cbHandler - The callback handler provided to the LoginContext
LoginExceptionpublic CallbackHandler createCallbackHandler(String username, String password)
username - The username to provide for a NameCallbackpassword - The password to provide for a PasswordCallback
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||