Class humhub\modules\ldap\authclient\LdapAuth
Inheritance | humhub\modules\ldap\authclient\LdapAuth » humhub\modules\user\authclient\BaseFormAuth » humhub\modules\user\authclient\BaseClient » yii\authclient\BaseClient |
---|---|
Implements | humhub\modules\user\authclient\interfaces\ApprovalBypass, humhub\modules\user\authclient\interfaces\AutoSyncUsers, humhub\modules\user\authclient\interfaces\PrimaryClient, humhub\modules\user\authclient\interfaces\SyncAttributes |
Subclasses | humhub\modules\user\authclient\ZendLdapClient |
Available since version | 1.1 |
LDAP Authentication
Public Properties
Public Methods
Method | Description | Defined By |
---|---|---|
auth() | Authenticate the user using the login form. | humhub\modules\ldap\authclient\LdapAuth |
getAuthClientInstance() | humhub\modules\ldap\authclient\LdapAuth | |
getId() | humhub\modules\ldap\authclient\LdapAuth | |
getIdAttribute() | humhub\modules\ldap\authclient\LdapAuth | |
getLdap() | Returns Zend LDAP | humhub\modules\ldap\authclient\LdapAuth |
getSyncAttributes() | Returns attribute names which should be synced on login | humhub\modules\ldap\authclient\LdapAuth |
getUser() | Find user based on ldap attributes | humhub\modules\ldap\authclient\LdapAuth |
getUserAttributes() | humhub\modules\ldap\authclient\LdapAuth | |
getUserCollection() | humhub\modules\ldap\authclient\LdapAuth | |
init() | humhub\modules\ldap\authclient\LdapAuth | |
setLdap() | Sets an Zend LDAP Instance | humhub\modules\ldap\authclient\LdapAuth |
setNormalizeUserAttributeMap() | humhub\modules\ldap\authclient\LdapAuth | |
syncUsers() | Refresh ldap users | humhub\modules\ldap\authclient\LdapAuth |
Protected Methods
Method | Description | Defined By |
---|---|---|
defaultName() | humhub\modules\ldap\authclient\LdapAuth | |
defaultNormalizeUserAttributeMap() | humhub\modules\ldap\authclient\LdapAuth | |
defaultTitle() | humhub\modules\ldap\authclient\LdapAuth | |
getUserAuto() | Try to find the user if authclient_id mapping is not set yet (legency) or idAttribute is not specified. | humhub\modules\ldap\authclient\LdapAuth |
getUserDn() | Returns the users LDAP DN | humhub\modules\ldap\authclient\LdapAuth |
getUserNode() | Returns Users LDAP Node | humhub\modules\ldap\authclient\LdapAuth |
initUserAttributes() | humhub\modules\user\authclient\BaseClient | |
normalizeUserAttributes() | humhub\modules\ldap\authclient\LdapAuth |
Events
Event | Type | Description | Defined By |
---|---|---|---|
EVENT_CREATE_USER | \humhub\modules\user\authclient\Event | An event raised on create user. | humhub\modules\user\authclient\BaseClient |
EVENT_UPDATE_USER | \humhub\modules\user\authclient\Event | An event raised on update user data. | humhub\modules\user\authclient\BaseClient |
Property Details
The ldap base dn
The auth client id
The email attribute
Attribute name to identify node
The login filter
The value for network timeout when connect to the LDAP server.
389
Of attributes which are synced with the user table
The ldap query to find humhub users
The ldap username attribute
Method Details
Authenticate the user using the login form.
public void auth ( ) | ||
throws | \yii\base\NotSupportedException |
---|
protected void defaultName ( ) |
protected void defaultNormalizeUserAttributeMap ( ) |
protected void defaultTitle ( ) |
public humhub\modules\ldap\authclient\LdapAuth getAuthClientInstance ( $ldapEntry ) | ||
$ldapEntry | Array |
public void getId ( ) |
public void getIdAttribute ( ) |
Returns Zend LDAP
public humhub\modules\ldap\components\ZendLdap getLdap ( ) | ||
throws | \Zend\Ldap\Exception\LdapException |
---|
Returns attribute names which should be synced on login
public array getSyncAttributes ( ) | ||
return | array | Attribute names to be synced |
---|
Find user based on ldap attributes
See also humhub\modules\user\authclient\interfaces\PrimaryClient.
public humhub\modules\user\models\User getUser ( ) | ||
return | humhub\modules\user\models\User | The user |
---|
public array getUserAttributes ( ) | ||
return | array | List of user attributes |
---|
Try to find the user if authclient_id mapping is not set yet (legency) or idAttribute is not specified.
protected humhub\modules\user\models\User getUserAuto ( ) |
public array getUserCollection ( ) | ||
throws | \Zend\Ldap\Exception\LdapException |
---|
Returns the users LDAP DN
protected string getUserDn ( ) | ||
return | string | The user dn if found |
---|
Returns Users LDAP Node
protected \Zend\Ldap\Node getUserNode ( ) | ||
return | \Zend\Ldap\Node | The users ldap node |
---|---|---|
throws | \Zend\Ldap\Exception\LdapException |
public void init ( ) |
protected void normalizeUserAttributes ( $attributes ) | ||
$attributes |
Sets an Zend LDAP Instance
public void setLdap ( \Zend\Ldap\Ldap $ldap ) | ||
$ldap | \Zend\Ldap\Ldap |
public void setNormalizeUserAttributeMap ( $normalizeUserAttributeMap ) | ||
$normalizeUserAttributeMap | array | Normalize user attribute map. |
Refresh ldap users
New users (found in ldap) will be automatically created if all required fiƩlds are set. Profile fields which are bind to LDAP will automatically updated.
public void syncUsers ( ) |