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 Details

    • registerPermissionsAndRoles

      void registerPermissionsAndRoles(Class<?> clazz, String pluginLibUID) throws AuthManagerException
      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 login
      password - the password
      pluginName - the plugin name
      Returns:
      auth info
      Throws:
      AuthManagerException - the auth manager exception
    • getUserCache

      Map<String,Object> getUserCache()
      Gets user cache.
      Returns:
      user cache
    • getPluginCache

      Map<String,AuthenticationLocal> getPluginCache()
      Gets plugin cache.
      Returns:
      plugin cache
    • setUserCache

      void setUserCache(Map<String,Object> map)
      Sets user cache.
      Parameters:
      map - the map
    • setPluginCache

      void setPluginCache(Map<String,AuthenticationLocal> map)
      Sets plugin cache.
      Parameters:
      map - the map