Package com.priint.pubserver.auth
Interface AuthManagerLocal
-
public interface AuthManagerLocalAn AuthManager contains methods to scan plugin classes for annotations on permissions and roles, that isRequiresPermissionsandRequiresRoles.For each distinct permission and role found in the plugin, an entry will be created in the Kernels database.
For roles to be added they shall be prefixed by the pluginlib's shortname, e.g. "MyPluginLib.MyRole".
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PubServerAuthenticationInfogetPluginAccess(java.lang.String login, java.lang.String password, java.lang.String pluginName)Gets plugin access.java.util.Map<java.lang.String,AuthenticationLocal>getPluginCache()Gets plugin cache.java.util.Map<java.lang.String,java.lang.Object>getUserCache()Gets user cache.voidregisterPermissionsAndRoles(java.lang.Class<?> clazz, java.lang.String pluginLibUID)Check plugin class for permission related annotations and automatically create roles and permissions.voidsetPluginCache(java.util.Map<java.lang.String,AuthenticationLocal> map)Sets plugin cache.voidsetUserCache(java.util.Map<java.lang.String,java.lang.Object> map)Sets user cache.
-
-
-
Method Detail
-
registerPermissionsAndRoles
void registerPermissionsAndRoles(java.lang.Class<?> clazz, java.lang.String pluginLibUID) throws AuthManagerExceptionCheck plugin class for permission related annotations and automatically create roles and permissions.- Parameters:
clazz- The plugin class within the plugin lib.pluginLibUID- The id of the lib.- Throws:
AuthManagerException- the auth manager exception
-
getPluginAccess
PubServerAuthenticationInfo getPluginAccess(java.lang.String login, java.lang.String password, java.lang.String pluginName) throws AuthManagerException
Gets plugin access.- Parameters:
login- the loginpassword- the passwordpluginName- the plugin name- Returns:
- auth info
- Throws:
AuthManagerException- the auth manager exception
-
getUserCache
java.util.Map<java.lang.String,java.lang.Object> getUserCache()
Gets user cache.- Returns:
- user cache
-
getPluginCache
java.util.Map<java.lang.String,AuthenticationLocal> getPluginCache()
Gets plugin cache.- Returns:
- plugin cache
-
setUserCache
void setUserCache(java.util.Map<java.lang.String,java.lang.Object> map)
Sets user cache.- Parameters:
map- the map
-
setPluginCache
void setPluginCache(java.util.Map<java.lang.String,AuthenticationLocal> map)
Sets plugin cache.- Parameters:
map- the map
-
-