|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.aselect.agent.authorization.AuthorizationEngine
public class AuthorizationEngine
A-Select Agent authorization engine.
Description:
The AuthorizationEngine
contains functionality for authorizing
users by means of A-Select attributes.
This components reads authorization rules from the configuration and can add
more evaluation rules during runtime using the
addAuthorizationRule
method.
The AuthorizationEngine
is implemented using the Singleton
design pattern.
Concurrency issues:
-
Method Summary | |
---|---|
static AuthorizationEngine |
getHandle()
Get a static handle to the AuthorizationEngine instance. |
boolean |
init(java.lang.Object oAuthorizationConfig,
ConfigManager configManager,
SystemLogger systemlogger)
Initializes the AuthorizationEngine . |
boolean |
isUserAuthorized(java.lang.String sAppId,
java.lang.String sURI,
java.util.Hashtable htUserAttributes)
Check if a user is authorized. |
void |
setAuthorizationRules(java.lang.String sAppId,
java.lang.String[] saIDs,
java.lang.String[] saRules,
java.lang.String[] saURIs)
Set authorization rules for an application. |
java.lang.String |
toString()
Retrieve a String represenattion of this AuthorizationEngine . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static AuthorizationEngine getHandle()
AuthorizationEngine
instance.
AuthorizationEngine
exists.
AuthorizationEngine
.public boolean init(java.lang.Object oAuthorizationConfig, ConfigManager configManager, SystemLogger systemlogger)
AuthorizationEngine
.
oAuthorizationConfig
- The authorization configuration section.configManager
- The configuration manager.systemlogger
- The systemlogger.
public void setAuthorizationRules(java.lang.String sAppId, java.lang.String[] saIDs, java.lang.String[] saRules, java.lang.String[] saURIs) throws ASelectAuthorizationException
sAppId != null
saRules != null
saURIs != null
saRules.length == saURIs.length
sAppId
- The application ID.saIDs
- The rules ID's.saRules
- The authorization rules.saURIs
- The authorization rule URI's.
ASelectAuthorizationException
- If one or more of the supplied
rules are not valid authorization rules.public boolean isUserAuthorized(java.lang.String sAppId, java.lang.String sURI, java.util.Hashtable htUserAttributes) throws ASelectAuthorizationException
sAppId != null
htUserAttributes != null
sAppId
- The app_id of the application that
the user is authorized for.sURI
- The URI for which the user is authorized.htUserAttributes
- The user attributes.
true
if the user is authorized to use the given
application, otherwise false
.
ASelectAuthorizationException
- If evalution of the rule fails.public java.lang.String toString()
AuthorizationEngine
.
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |