Package com.priint.pubserver.auth
Interface AuthManagerLocal
public interface AuthManagerLocal
An AuthManager contains methods to scan plugin classes for annotations on permissions and roles, that is
RequiresPermissions and
RequiresRoles.
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
Modifier and TypeMethodDescriptiongetPluginAccess(String login, String password, String pluginName) Gets plugin access.Gets plugin cache.Gets user cache.voidregisterPermissionsAndRoles(Class<?> clazz, String pluginLibUID) Check plugin class for permission related annotations and automatically create roles and permissions.voidSets plugin cache.voidsetUserCache(Map<String, Object> map) Sets user cache.
-
Method Details
-
registerPermissionsAndRoles
Check 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(String login, String password, 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
Gets user cache.- Returns:
- user cache
-
getPluginCache
Map<String,AuthenticationLocal> getPluginCache()Gets plugin cache.- Returns:
- plugin cache
-
setUserCache
Sets user cache.- Parameters:
map- the map
-
setPluginCache
Sets plugin cache.- Parameters:
map- the map
-