ELogin
Enterprise Lab AAI Login Application
Public Member Functions | Static Public Member Functions
ch.enterpriselab.login.control.ManagerLDAP Class Reference
Collaboration diagram for ch.enterpriselab.login.control.ManagerLDAP:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void createAccount (String uid, UserLDAP user) throws NamingException
void deleteAccount (String uid) throws NamingException
int getHighestUidNumber () throws NamingException
String getUnusedUID (final ELUser elUser, final String defaulAAIHomeOrg) throws NamingException
boolean isAccountDisabled (String uid) throws NamingException
String getLastLogin (String uid) throws NamingException
String getUIDfromAAIUID (String aaiUID) throws NamingException
boolean isUIDExist (String uid) throws NamingException
void setMail (String uid, String mailAddress) throws NamingException
String getMail (String uid) throws NamingException
String getAAIShibSwissEPUniqueID (String uid) throws NamingException
String getGroupID (String uid) throws NamingException
String getUIDNumber (String uid) throws NamingException
void setLoginShell (String uid, String loginShell) throws NamingException
void setPassword (String uid, String password) throws NamingException
void setAAIShibSwissEPUniqueID (String uid, String aAIShibSwissEPUniqueID) throws NamingException
void setAAIcreated (String uid, String aAIcreated) throws NamingException
void enableAccount (String uid) throws NamingException
void disableAccount (String uid) throws NamingException
ArrayList< String > getAccountsToDisableOrDelete (int minExistenceDays, int maxInactiveDays, boolean onlyDisabledAccounts) throws NamingException
boolean isConnectionReady () throws NamingException

Static Public Member Functions

static ManagerLDAP getInstance ()

Detailed Description

This class is used for modifying and reading LDAP attributes. 1st Step of every query request or update/delete/create request, you need to get a context (with getDirContext). 2nd step is the action (read/create/update/delete) 3rd step is to close the context

Author:
Tom

Member Function Documentation

void ch.enterpriselab.login.control.ManagerLDAP.createAccount ( String  uid,
UserLDAP  user 
) throws NamingException

Adds a user to the LDAP

Parameters:
uidof the user
usermust be according to the schema

Here is the caller graph for this function:

void ch.enterpriselab.login.control.ManagerLDAP.deleteAccount ( String  uid) throws NamingException

Deletes a LDAP Account

Parameters:
uidusername

Here is the caller graph for this function:

void ch.enterpriselab.login.control.ManagerLDAP.disableAccount ( String  uid) throws NamingException

Disables a user account

Parameters:
uidusername

Here is the caller graph for this function:

void ch.enterpriselab.login.control.ManagerLDAP.enableAccount ( String  uid) throws NamingException

Enables a user account

Parameters:
uidusername

Here is the caller graph for this function:

String ch.enterpriselab.login.control.ManagerLDAP.getAAIShibSwissEPUniqueID ( String  uid) throws NamingException

Here is the caller graph for this function:

ArrayList<String> ch.enterpriselab.login.control.ManagerLDAP.getAccountsToDisableOrDelete ( int  minExistenceDays,
int  maxInactiveDays,
boolean  onlyDisabledAccounts 
) throws NamingException
Parameters:
minExistenceDaysused for "how many days can an account exist without being ever used for login, before it gets disabled/deleted again"
maxInactiveDaysused for "how many days can an account exist without being used for login, before it gets disabled/deleted
onlyDisabledAccountsif true: used for all accounts which can be deleted (returns only disabled accounts)
Returns:
ArrayList<String> with uid's which are a) never used for login AND older than "minExistenceDays" b) not used for login for longer than "inactiveDays"
Exceptions:
NamingException

Here is the caller graph for this function:

String ch.enterpriselab.login.control.ManagerLDAP.getGroupID ( String  uid) throws NamingException

Get primaryGroup gidNumber from a specified LDAP user

Parameters:
uidusername)
Returns:
primaryGroupd ID returns an empty string if the returnValue is empty

Here is the caller graph for this function:

int ch.enterpriselab.login.control.ManagerLDAP.getHighestUidNumber ( ) throws NamingException

Returns highest UidNumber under peoplePath in LDAP

Returns:
highest UidNumber

Here is the caller graph for this function:

static ManagerLDAP ch.enterpriselab.login.control.ManagerLDAP.getInstance ( ) [static]

Static method. (Singelton Pattern)

Here is the caller graph for this function:

String ch.enterpriselab.login.control.ManagerLDAP.getLastLogin ( String  uid) throws NamingException

Returns lastLogin date from pwdLastAuthTime (format: yyyymmddhhmmss)

Parameters:
uid(userName)
Returns:
pwdLastAuthTime (string "false:additional text", if no time set or user not found)
String ch.enterpriselab.login.control.ManagerLDAP.getMail ( String  uid) throws NamingException

Returns email address of a specified LDAP user

Parameters:
uidusername
Returns:
email address of specified user

Here is the caller graph for this function:

String ch.enterpriselab.login.control.ManagerLDAP.getUIDfromAAIUID ( String  aaiUID) throws NamingException

Looks for a ldapuser according to the AAI UID. Based on the Unique ID from AAI (Shib-SwissEP-UniqueID). If no user is found in LDAP with the aaiUID, an empty string is returned.

Parameters:
aaiUIDthe unique aai uid (e.g. "12345678@hslu.ch")
Returns:
userName of found user or empty string if nothing has been found.

Here is the caller graph for this function:

String ch.enterpriselab.login.control.ManagerLDAP.getUIDNumber ( String  uid) throws NamingException

Returns the uniqueIDNumber (uidNumber) of a specified user (specified with the username)

Parameters:
uidusername
Returns:
uidNumber unique ID within LDAP

Here is the caller graph for this function:

String ch.enterpriselab.login.control.ManagerLDAP.getUnusedUID ( final ELUser  elUser,
final String  defaulAAIHomeOrg 
) throws NamingException
Returns:
8-digit unique username Generates a new unique username (uid). Based on the aai credential an free usernames in the ldap server for HSLU accounts, the application tries to use the existing account. For external accounts, the application adds a "_" before the first letter of the firstname and fills it up with the lastname
Parameters:
elUserWebuser Object
defaulAAIHomeOrgHome Organisation (f.e. hslu.ch)
Returns:
a free new ldapUID
Exceptions:
NamingException

Here is the call graph for this function:

Here is the caller graph for this function:

boolean ch.enterpriselab.login.control.ManagerLDAP.isAccountDisabled ( String  uid) throws NamingException

Checks if an LDAP Account is enabled or disabled. User cannot login when it is disabled.

Parameters:
uiduserName
Returns:
"true" if account is disabled

Here is the caller graph for this function:

boolean ch.enterpriselab.login.control.ManagerLDAP.isConnectionReady ( ) throws NamingException

Check if the connection to the ldap Server Ready to use.

Returns:
true if the connection is ready, else false

Here is the caller graph for this function:

boolean ch.enterpriselab.login.control.ManagerLDAP.isUIDExist ( String  uid) throws NamingException

Check if the given username (uid) exists in the ldap-server

Parameters:
uidfrom the username (f.e. tamueller)
Returns:
user exists

Here is the caller graph for this function:

void ch.enterpriselab.login.control.ManagerLDAP.setAAIcreated ( String  uid,
String  aAIcreated 
) throws NamingException
void ch.enterpriselab.login.control.ManagerLDAP.setAAIShibSwissEPUniqueID ( String  uid,
String  aAIShibSwissEPUniqueID 
) throws NamingException
void ch.enterpriselab.login.control.ManagerLDAP.setLoginShell ( String  uid,
String  loginShell 
) throws NamingException

Set login shell attribute in LDAP for a specified user

Parameters:
uidusername
loginShell

Here is the caller graph for this function:

void ch.enterpriselab.login.control.ManagerLDAP.setMail ( String  uid,
String  mailAddress 
) throws NamingException

Set email address for an LDAP user. If a mail address's already been set, it will be overwritten

Parameters:
uidusername
mailAddressnew mail address

Here is the caller graph for this function:

void ch.enterpriselab.login.control.ManagerLDAP.setPassword ( String  uid,
String  password 
) throws NamingException

Set a new password. Override exist password.

Parameters:
uidusername
passwordnew password

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables