Directory Manager Plugin

The Directory Manager Plugin allows for the integration of users from external systems, such as Active Directory or LDAP, into Joget. This plugin can be configured in the Settings - Directory Manager. A functional Directory Manager Plugin must extend the org.joget.directory.model.service.DefaultDirectoryManagerPlugin abstract class to ensure proper integration and user management capabilities.

Abstract Class

org.joget.directory.model.service.DefaultDirectoryManagerPlugin

Abstract Methods

authenticate

public boolean authenticate(java.lang.String username, java.lang.String password)
Method called to authenticate a particular User against the directory.

getDepartmentById

public org.joget.directory.model.Department getDepartmentById(java.lang.String departmentId)
Method called to retrieve a specific Department by Department Id.

getDepartmentByName

public org.joget.directory.model.Department getDepartmentByName(java.lang.String name)
Method called to retrieve a specific Department by Department Name.

getDepartmentHod

public org.joget.directory.model.User getDepartmentHod(java.lang.String departmentId)
Method called to return a specific HOD for a Department.

getDepartmentList

public java.util.Collection<org.joget.directory.model.Department> getDepartmentList()
Generic method called to retrieve all Departments within the directory.

getDepartmentList

public java.util.Collection<org.joget.directory.model.Department> getDepartmentList(java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve all Departments within the directory filtered by search parameters.

getDepartmentListByOrganization

public java.util.Collection<org.joget.directory.model.Department> getDepartmentListByOrganization(java.lang.String organizationId, java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve all Departments within a specific Organization filtered by search parameters.

getDepartmentsByOrganizationId

public java.util.Collection<org.joget.directory.model.Department> getDepartmentsByOrganizationId(java.lang.String filterString, java.lang.String organizationId, java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve all Departments within a specific Organization filtered by search parameters.

getDepartmentsByParentId

public java.util.Collection<org.joget.directory.model.Department> getDepartmentsByParentId(java.lang.String filterString, java.lang.String parentId, java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve all sub Department within a specific Department filtered by search parameters.

getDepartmentUserByGradeId

public java.util.Collection<org.joget.directory.model.User> getDepartmentUserByGradeId(java.lang.String departmentId, java.lang.String gradeId)
Method called to retrieve a listing of Users which belongs to a specified Department and Grade.

getParentDepartment

public org.joget.directory.model.Department getParentDepartment(java.lang.String id)
Method called to retrieve a parent Department of a Department.

getParentDepartmentByName

public org.joget.directory.model.Department getParentDepartmentByName(java.lang.String name)
Method called to retrieve a parent Department of a Department by Department Name.

getTotalDepartments

public java.lang.Long getTotalDepartments(java.lang.String organizationId)
Method called to retrieve the number of Departments within the directory.

getTotalDepartmentnsByOrganizationId

public java.lang.Long getTotalDepartmentnsByOrganizationId(java.lang.String filterString, java.lang.String organizationId)
Method called to retrieve the number of Departments within a specific Organization filtered by search parameters.

getTotalDepartmentsByParentId

public java.lang.Long getTotalDepartmentsByParentId(java.lang.String filterString, java.lang.String parentId)
Method called to retrieve the number of sub Departments within a specific Department.

getEmployment

public org.joget.directory.model.Employment getEmployment(java.lang.String id)
Method called to retrieve a specific Employment info.

getEmployments

public java.util.Collection<org.joget.directory.model.Employment> getEmployments(java.lang.String filterString, java.lang.String organizationId, java.lang.String departmentId, java.lang.String gradeId, java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve the users' employment info within the directory filtered by search parameters.

getTotalEmployments

public java.lang.Long getTotalEmployments(java.lang.String filterString, java.lang.String organizationId, java.lang.String departmentId, java.lang.String gradeId)
Method called to retrieve the number of users' employment info within the directory.

getGradeById

public org.joget.directory.model.Grade getGradeById(java.lang.String gradeId)
Method called to retrieve a specific Grade by Grade id.

getGradeByName

public org.joget.directory.model.Grade getGradeByName(java.lang.String name)
Method called to retrieve a specific Grade by Grade Name.

getGradeList

public java.util.Collection<org.joget.directory.model.Grade> getGradeList()
Generic method called to retrieve all Grades within the directory.

getGradesByOrganizationId

public java.util.Collection<org.joget.directory.model.Grade> getGradesByOrganizationId(java.lang.String filterString, java.lang.String organizationId, java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve all Grades within a specific Organization filtered by search parameters.

getTotalGradesByOrganizationId

public java.lang.Long getTotalGradesByOrganizationId(java.lang.String filterString, java.lang.String organizationId)
Method called to retrieve the number of Grades within a specific Organization filtered by search parameters.

getGroupById

public org.joget.directory.model.Group getGroupById(java.lang.String groupId)
Method called to retrieve a specific Group by id.

getGroupByName

public org.joget.directory.model.Group getGroupByName(java.lang.String groupName)
Method called to retrieve a specific Group by name.

getGroupsByUserId

public java.util.Collection<org.joget.directory.model.Group> getGroupsByUserId(java.lang.String filterString, java.lang.String userId, java.lang.String organizationId, java.lang.Boolean inGroup, java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve a collection of Group in/not in which a user belongs to and filtered by search parameters.

getGroupByUsername

public java.util.Collection<org.joget.directory.model.Group> getGroupByUsername(java.lang.String username)
Method called to retrieve a collection of Group in which a user belongs to.

getGroupList

public java.util.Collection<org.joget.directory.model.Group> getGroupList()
Generic method called to retrieve the entire Group listing within the directory.

getGroupList

public java.util.Collection<org.joget.directory.model.Group> getGroupList(java.lang.String nameFilter, java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve the entire Group listing within the directory filtered by search parameters.

getGroupsByOrganizationId

public java.util.Collection<org.joget.directory.model.Group> getGroupsByOrganizationId(java.lang.String filterString, java.lang.String organizationId, java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve all groups within a specific Organization filtered by search parameters.

getTotalGroups

public java.lang.Long getTotalGroups()
Method call to retrieve the number of Groups available.

getTotalGroupsByOrganizationId

public java.lang.Long getTotalGroupsByOrganizationId(java.lang.String filterString, java.lang.String organizationId)
Method call to retrieve the number of Groups available within a specific Organization filtered by search parameters.

getTotalGroupsByUserId

public java.lang.Long getTotalGroupsByUserId(java.lang.String filterString, java.lang.String userId, java.lang.String organizationId, java.lang.Boolean inGroup)
Method called to retrieve the number of Group in/not in which a user belongs to.

getOrganization

public org.joget.directory.model.Organization getOrganization(java.lang.String id)
Method called to retrieve a specific Organization by Id.

getOrganizationByName

public org.joget.directory.model.Organization getOrganizationByName(String name)
Method called to retrieve a specific Organization by Name.

getOrganizationsByFilter

public java.util.Collection<org.joget.directory.model.Organization> getOrganizationsByFilter(java.lang.String filterString, java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve all Organizations filtered by search parameters.

getTotalOrganizationsByFilter

public java.lang.Long getTotalOrganizationsByFilter(java.lang.String filterString)
Method called to retrieve the number of Organizations.

getUserByDepartmentId

public java.util.Collection<org.joget.directory.model.User> getUserByDepartmentId(java.lang.String departmentId)
Method called to retrieve a listing of Users by Department id.

getUserByGradeId

public java.util.Collection<org.joget.directory.model.User> getUserByGradeId(java.lang.String gradeId)
Method called to retrieve a listing of Users by Grade id.

getUserByGroupId

public java.util.Collection<org.joget.directory.model.User> getUserByGroupId(java.lang.String groupId)
Method called to retrieve a listing of Users by Group id.

getUserByGroupName

public java.util.Collection<org.joget.directory.model.User> getUserByGroupName(java.lang.String groupName)
Method called to retrieve a listing of Users by Group name.

getUserById

public org.joget.directory.model.User getUserById(java.lang.String userId)
Method called to retrieve a specific User by User id.

getUserByOrganizationId

public java.util.Collection<org.joget.directory.model.User> getUserByOrganizationId(java.lang.String organizationId)
Method called to retrieve a listing of Users by Organization id.

getUserByUsername

public org.joget.directory.model.User getUserByUsername(java.lang.String username)
Method called to retrieve a specific User by Username.

getUserList

public java.util.Collection<org.joget.directory.model.User> getUserList()
Generic method called to retrieve the entire User listing within the directory.

getUserList

public java.util.Collection<org.joget.directory.model.User> getUserList(java.lang.String nameFilter, java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve the entire User listing within the directory filtered by search parameters.

getUsers

public java.util.Collection<org.joget.directory.model.User> getUsers(java.lang.String filterString, java.lang.String organizationId, java.lang.String departmentId, java.lang.String gardeId, java.lang.String groupId, java.lang.String roleId, java.lang.String active, java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve the users within the directory filtered by search parameters.

getTotalUsers

public java.lang.Long getTotalUsers()
Method called to retrieve the number of Users available.

getTotalUsers

public java.lang.Long getTotalUsers(java.lang.String filterString, java.lang.String organizationId, java.lang.String departmentId, java.lang.String gardeId, java.lang.String groupId, java.lang.String roleId, java.lang.String active)
Method call to retrieve the number of Users available within the directory filtered by search parametersisUserInGroup.

isUserInGroup

public boolean isUserInGroup(java.lang.String username, java.lang.String groupName)
Method called to check if a User belongs to a specific Group.

getUserDepartmentUser

public java.util.Collection<org.joget.directory.model.User> getUserDepartmentUser(java.lang.String username)
Method called to retrieve a listing of Users which belongs to the same Department as the specific Username.

getUserHod

public java.util.Collection<org.joget.directory.model.User> getUserHod(java.lang.String username)
Method called to retrieve a listing of HODs in which a specific User reports to.

getUserSubordinate

public java.util.Collection<org.joget.directory.model.User> getUserSubordinate(java.lang.String username)
Method called to retrieve a listing of all the subordinates which reports to a specific User.

getUsersSubordinate

public java.util.Collection<org.joget.directory.model.User> getUsersSubordinate(java.lang.String username, java.lang.String sort, java.lang.Boolean desc, java.lang.Integer start, java.lang.Integer rows)
Method called to retrieve a listing of all the subordinates which reports to a specific User filtered by search parameters.

getTotalUsersSubordinate

public java.lang.Long getTotalUsersSubordinate(java.lang.String username)
Method called to retrieve the number of subordinates which reports to a specific User.

getUserRoles

public java.util.Collection<org.joget.directory.model.Role> getUserRoles(java.lang.String username)
Method called to retrieve the Roles belonging to a specific User by Username.

Utility Methods

getDirectoryManagerImpl

public org.joget.directory.model.service.DirectoryManager getDirectoryManagerImpl(java.util.Map properties)
Used by System to retrieve a directory manager implementation.

 

Interface

org.joget.directory.model.service.UserSecurityFactory

  • Under wflow-directory module
  • An interface that can be implement by a DirectoryManager implementation to provide a UserSecurity implementation

Interface Methods

getUserSecurity

public org.joget.directory.model.service.UserSecurity getUserSecurity()
Method to return a UserSecurity implementation to enhance the user security.

 

org.joget.directory.model.service.UserSecurity

  • Under wflow-directory module
  • Interface for user security enhancement.
  • Used to extend the ability of Directory Manager Plugin when managing local user directory.
  • An implementation need to return through the getUserSecurity method in a Directory Manager plugin.

Interface Methods

getPropertyOptions

public java.lang.String getPropertyOptions()
Get JSON property options to embed into the property options of Directory Manager Plugin.

setProperties

public void setProperties(java.util.Map<java.lang.String, java.lang.Object>  properties)
Set properties to use in User Security Implementation.

getProperties

public java.util.Map<java.lang.String, java.lang.Object> getProperties()
Get properties to use in User Security Implementation.

getDisableHashLogin

public java.lang.Boolean getDisableHashLogin()
Disable Hash Login?

getAllowSessionTimeout

public java.lang.Boolean getAllowSessionTimeout()
Allow Session Timeout?

getForceSessionTimeout

public java.lang.Boolean getForceSessionTimeout()
Force Session Timeout?

getAuthenticateAllApi

public java.lang.Boolean getAuthenticateAllApi()
Authenticate all API?

encryptPassword

public java.lang.String encryptPassword (java.lang.String username, java.lang.String password)
Encrypt Password with custom methodology.

verifyPassword

public java.lang.Boolean verifyPassword (org.joget.directory.model.User user, java.lang.String password)
Verify Password with custom methodology.

passwordPolicies

public java.util.Collection<java.lang.String> passwordPolicies ()
To get a set of password policies to display in user profile form.

validatePassword

public java.util.Collection<java.lang.String> validatePassword (java.lang.String username, java.lang.String oldPassword, java.lang.String newPassword, java.lang.String confirmPassword)
To validate password format and validity.
Return Collection of error message String.

validateUserOnInsert

public java.util.Collection<java.lang.String> validateUserOnInsert(org.joget.directory.model.User user)
To validate user before insert to database.
Return Collection of error message String.

validateUserOnUpdate

public java.util.Collection<java.lang.String> validateUserOnUpdate(org.joget.directory.model.User user)
To validate user before updating.
Return Collection of error message String.

validateUserOnProfileUpdate

public java.util.Collection<java.lang.String> validateUserOnProfileUpdate(org.joget.directory.model.User user)
To validate user before updating profile.
Return Collection of error message String.

insertUserPostProcessing

public void insertUserPostProcessing(org.joget.directory.model.User user)
Processing after a user is added.

updateUserPostProcessing

public void updateUserPostProcessing(org.joget.directory.model.User user)
Processing after a user is modified.

updateUserPostProcessing

public void updateUserPostProcessing(org.joget.directory.model.User user)
Processing after a user is modified.

updateUserProfilePostProcessing

public void updateUserProfilePostProcessing(org.joget.directory.model.User user)
Processing after a user profile is updated.

passwordResetPostProcessing

public void passwordResetPostProcessing(org.joget.directory.model.User user)
Processing after a user password is reset.

deleteUserPostProcessing

public void deleteUserPostProcessing(java.lang.String username)
Processing after a user is deleted.

getLoginFormFooter

public java.lang.String getLoginFormFooter()
HTML to add below login form.

getUserCreationFormFooter

public java.lang.String getUserCreationFormFooter()
HTML to add below user creation form.

getUserEditingFormFooter

public java.lang.String getUserEditingFormFooter(org.joget.directory.model.User user)
HTML to add below user editing form.

getUserProfileFooter

public java.lang.String getUserProfileFooter(org.joget.directory.model.User user)
HTML to add below user profile form.

getUserDetailsButtons

public java.lang.String getUserDetailsButtons(org.joget.directory.model.User user)
HTML to extend user details page button.

loginPreProcessing

public void loginPreProcessing(org.joget.directory.model.User user, java.lang.String password)
Processing before user login authentication.

loginPostProcessing

public void loginPostProcessing(org.joget.directory.model.User user, java.lang.String password, java.lang.Boolean loggedIn)
Processing after user login authentication.

requestPostProcessing

public void requestPostProcessing()
Processing after HTTP Request Completed.

isDataExist

public boolean isDataExist(java.lang.String username)
Check whether a custom security data is exist for a user.

Plugin Properties Options

Tutorials

Related Community Plugins

  • Not Available
Created by Damian Last modified by Aadrian on Dec 20, 2024