DoKS API

From DoKSwiki

Table of contents

FolderFacade

How to create folders?


... under construction ...

RecordFacade

How to create records?


... under construction ...

UserFacade

LoginConfiguration

Set the authentication method, either using the usernames and passwords stored in the DoKS database (this is the default):

userFacade.setLoginConfiguration(userDto.id, "");

Either using an external authentication method like LDAP, configured in auth.conf:

userFacade.setLoginConfiguration(userDto.id, "my_authentication_configuration");

Auth.conf could look like this:

#auth.conf

my_authentication_configuration {
   doks.accessControl.login.LdapSearchLoginModule required
   java.naming.provider.url="ldap://LDAPserver.myschool.com:389/"
   java.naming.security.authentication="simple"
   searchDN="cn=users,dc=staff"
   searchPassword="mypassword"
   searchBase="dc=edu" 
   searchFilter="cn=$USERNAME";
};

The doks.accessControl.login.LdapSearchLoginModule class takes care of the validation of username and password. DoKS can easily be extended with other plugin LoginModules.