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 Detail

      • registerPermissionsAndRoles

        void registerPermissionsAndRoles​(java.lang.Class<?> clazz,
                                         java.lang.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​(java.lang.String login,
                                                    java.lang.String password,
                                                    java.lang.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

        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