public class SecurityManager extends Object
| Constructor and Description |
|---|
SecurityManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate() |
AgentProxy |
authenticate(String agentName,
String agentPassword,
String resource) |
boolean |
checkPermissions(AgentPath agent,
Activity act,
ItemPath itemPath) |
static String |
decodePublicSecurityMessage(Throwable ex)
Reads the message from the exception that can be show to the user.
|
static String |
encodePublicSecurityMessage(String msg)
Wraps the massage with specific tokens indicating the the exception has a message to the user.
|
org.apache.shiro.subject.Subject |
getSubject(AgentPath agent) |
org.apache.shiro.subject.Subject |
getSubject(String principal) |
void |
setupShiro()
Loads shiro.ini file from a file or from the classpath (default)
TODO: replace the use of IniSecurityManagerFactory with shiro Environment initialization
|
boolean |
shiroAuthenticate(String agentName,
String agentPassword) |
public SecurityManager()
throws InvalidDataException
InvalidDataExceptionpublic void authenticate()
throws InvalidDataException,
ObjectNotFoundException
public AgentProxy authenticate(String agentName, String agentPassword, String resource) throws InvalidDataException, ObjectNotFoundException
agentName - agentPassword - resource - InvalidDataExceptionObjectNotFoundExceptionpublic org.apache.shiro.subject.Subject getSubject(AgentPath agent)
agent - public org.apache.shiro.subject.Subject getSubject(String principal)
principal - public void setupShiro()
public static String decodePublicSecurityMessage(Throwable ex)
ex - the exception to be processedpublic static String encodePublicSecurityMessage(String msg)
msg - the message to be wrappedpublic boolean shiroAuthenticate(String agentName, String agentPassword) throws InvalidDataException
agentName - agentPassword - InvalidDataExceptionpublic boolean checkPermissions(AgentPath agent, Activity act, ItemPath itemPath) throws AccessRightsException, ObjectNotFoundException
agent - stepPath - itemPath - AccessRightsExceptionObjectNotFoundException - Item was not foundCopyright © 1997–2019 CRISTAL-iSE. All rights reserved.