Class SyncopeBackingEngine

    • Constructor Detail

      • SyncopeBackingEngine

        public SyncopeBackingEngine​(String address,
                                    String version,
                                    String adminUser,
                                    String adminPassword)
    • Method Detail

      • addUser

        public void addUser​(String username,
                            String password)
        Description copied from interface: BackingEngine
        Create a new user.
        Specified by:
        addUser in interface BackingEngine
        Parameters:
        username - the user name.
        password - the user password.
      • deleteUser

        public void deleteUser​(String username)
        Description copied from interface: BackingEngine
        Delete an user.
        Specified by:
        deleteUser in interface BackingEngine
        Parameters:
        username - the user name.
      • listUsers

        public List<org.apache.karaf.jaas.boot.principal.UserPrincipal> listUsers()
        Description copied from interface: BackingEngine
        List all users.
        Specified by:
        listUsers in interface BackingEngine
        Returns:
        the list of UserPrincipal.
      • lookupUser

        public org.apache.karaf.jaas.boot.principal.UserPrincipal lookupUser​(String username)
        Description copied from interface: BackingEngine
        Retrieve the UserPrincipal corresponding to an username, or null if user doesn't exist.
        Specified by:
        lookupUser in interface BackingEngine
        Parameters:
        username - The username.
        Returns:
        The UserPrincipal or null.
      • listRoles

        public List<org.apache.karaf.jaas.boot.principal.RolePrincipal> listRoles​(Principal principal)
        Description copied from interface: BackingEngine
        List Roles for principal. This could either be a UserPrincipal or a GroupPrincipal.
        Specified by:
        listRoles in interface BackingEngine
        Parameters:
        principal - the principal.
        Returns:
        the list of roles.
      • addRole

        public void addRole​(String username,
                            String role)
        Description copied from interface: BackingEngine
        Add a role to the user.
        Specified by:
        addRole in interface BackingEngine
        Parameters:
        username - the user name.
        role - the role.
      • deleteRole

        public void deleteRole​(String username,
                               String role)
        Description copied from interface: BackingEngine
        Remove a role from a user.
        Specified by:
        deleteRole in interface BackingEngine
        Parameters:
        username - the user name.
        role - the role.
      • listGroups

        public List<org.apache.karaf.jaas.boot.principal.GroupPrincipal> listGroups​(org.apache.karaf.jaas.boot.principal.UserPrincipal principal)
        Description copied from interface: BackingEngine
        List groups that a user is member of.
        Specified by:
        listGroups in interface BackingEngine
        Parameters:
        principal - the UserPrincipal.
        Returns:
        the list of GroupPrincipal.
      • addGroup

        public void addGroup​(String username,
                             String group)
        Description copied from interface: BackingEngine
        Add a user into a given group.
        Specified by:
        addGroup in interface BackingEngine
        Parameters:
        username - the user name.
        group - the group.
      • deleteGroup

        public void deleteGroup​(String username,
                                String group)
        Description copied from interface: BackingEngine
        Remove a user from a group.
        Specified by:
        deleteGroup in interface BackingEngine
        Parameters:
        username - the user name.
        group - the group.
      • addGroupRole

        public void addGroupRole​(String group,
                                 String role)
        Description copied from interface: BackingEngine
        Add a role in a group.
        Specified by:
        addGroupRole in interface BackingEngine
        Parameters:
        group - the group.
        role - the role.
      • listGroups

        public Map<org.apache.karaf.jaas.boot.principal.GroupPrincipal,​String> listGroups()
        Description copied from interface: BackingEngine
        List all groups.
        Specified by:
        listGroups in interface BackingEngine
        Returns:
        the groups.