Class: auth_config
Source Location: /security/class.auth_config.inc
Class auth_config
Method Summary
| boolean |
canMd5() |
Does the authentication method support md5 encoding of passwords? |
| void |
getAttribEntity() |
This function returns the level/group(s) that are allowed to view/edit a certain attribute of a given node. |
| mixed |
getEntity() |
This function returns the level/group(s) that are allowed to perform the given action on a node. |
| mixed |
getPassword() |
This function returns password or false, if password can't be retrieve/recreate |
| const |
getPasswordPolicy() |
This function returns "get password" policy for current auth method |
| array |
getUser() |
This function returns information about a user in an associative array with the following elements: "name" -> the userid (should normally be the same as the $user variable that gets passed to it. |
| false |
setPasswordAllowed() |
This function returns a boolean that is true when the class allows the resetting of the password of a user. |
Methods
Does the authentication method support md5 encoding of passwords?
API Tags:
| Return: | True if md5 is always used. false if md5 is not supported. Drivers that support both md5 and cleartext passwords can return atkconfig("authentication_md5") to let the application decide whether to use md5. |
Redefinition of:
- auth_interface::canMd5()
- Does the authentication method support md5 encoding of passwords?
void getAttribEntity(
String
$node, String
$attrib, String
$mode, mixed
3
)
|
|
This function returns the level/group(s) that are allowed to view/edit a certain attribute of a given node.
Parameters:
|
String |
$node: |
The full nodename of the node for which to check attribute access. |
|
String |
$attrib: |
The name of the attribute to check |
|
String |
$mode: |
"view" or "edit" |
|
mixed |
3: |
One (int) or more (array) entities that are allowed to view/edit the attribute. |
Redefinition of:
- auth_interface::getAttribEntity()
- This function returns the level/group(s) that are allowed to view/edit a certain attribute of a given node.
mixed getEntity(
String
$node, String
$action
)
|
|
This function returns the level/group(s) that are allowed to perform the given action on a node.
Parameters:
|
String |
$node: |
The full nodename of the node for which to check the privilege. (modulename.nodename) |
|
String |
$action: |
The privilege to check. |
API Tags:
| Return: | One (int) or more (array) entities that are allowed to perform the action. |
Redefinition of:
- auth_interface::getEntity()
- This function returns the level/group(s) that are allowed to perform the given action on a node.
mixed getPassword(
string
$username
)
|
|
This function returns password or false, if password can't be retrieve/recreate
Parameters:
|
string |
$username: |
User for which the password should be regenerated |
API Tags:
| Return: | string with password or false |
Redefinition of:
- auth_interface::getPassword()
- This function returns password or false, if password can't be retrieve/recreate
const getPasswordPolicy(
)
|
|
This function returns "get password" policy for current auth method
Redefinition of:
- auth_interface::getPasswordPolicy()
- This function returns "get password" policy for current auth method
array getUser(
String
$user
)
|
|
This function returns information about a user in an associative array with the following elements: "name" -> the userid (should normally be the same as the $user variable that gets passed to it.
"level" -> The level/group(s) to which this user belongs. Specific implementations of the method may add more information if necessary.
Parameters:
|
String |
$user: |
The login of the user to retrieve. |
API Tags:
| Return: | Information about a user. |
Redefinition of:
- auth_interface::getUser()
- This function returns information about a user in an associative array with the following elements: "name" -> the userid (should normally be the same as the $user variable that gets passed to it.
false setPasswordAllowed(
)
|
|
This function returns a boolean that is true when the class allows the resetting of the password of a user.
API Tags:
| Deprecated: | Seems like this function is not used anymore |
int validateUser(
String
$user, String
$passwd
)
|
|
Authenticate a user.
Parameters:
|
String |
$user: |
The login of the user to authenticate. |
|
String |
$passwd: |
The password of the user. Note: if the canMd5 function of an implementation returns true, $passwd will be passed as an md5 string. |
API Tags:
| Return: | AUTH_SUCCESS - Authentication succesful AUTH_MISMATCH - Authentication failed, wrong user/password combination AUTH_LOCKED - Account is locked, can not login with current username. AUTH_ERROR - Authentication failed due to some error which cannot be solved by just trying again. If you return this value, you *must* also fill the m_fatalError variable. |
Redefinition of:
- auth_interface::validateUser()
- Authenticate a user.