-
Notifications
You must be signed in to change notification settings - Fork 0
Writing custom authentication providers
Team Planer allows to implement custom authentication providers which are used for logging into the application frontend.
By default the authentication is disabled ("None" provider).
You can write your own authentication provider which can then be used to retrieve the permissions from LDAP or similar.
An authentication provider is a simple class in PHP implementing the iUserAuth interface.
The class has to implement the following methods:
- public function checkAuth()
- public function forceAuth()
- public function logout()
- public function checkPermissions()
- public function getUsername()
See the section Methods for more details.
This method is called to check whether the user is logged in.
The method should not redirect the user to another location.
If the user is logged in the method should return true, otherwise the method should return false.
This method is called once the user should be redirected to a login page or similar.
This method does not have to return a value.
Called once the user clicks the logout button.
You may redirect the user to another location.
This method does not have to return a value.
Called to check whether the currently logged in user has the required permissions.
This method should return true if the user is allowed to access the application, otherwise it should return false.
This method should return the name of the logged in user.
The username should be the same as defined in the users table in the database.