Authwebserver
extends AuthPluginBase
in package
Table of Contents
Constants
- ERROR_ALREADY_EXISTING_USER = 120
- ERROR_AUTH_METHOD_INVALID = 30
- ERROR_INVALID_EMAIL = 110
- ERROR_IP_LOCKED_OUT = 98
- ERROR_LDAP_CONNECTION = 130
- ERROR_LDAP_MODE = 135
- ERROR_LDAP_NO_BIND = 160
- ERROR_LDAP_NO_EMAIL = 140
- ERROR_LDAP_NO_FULLNAME = 150
- ERROR_LDAP_NO_SEARCH_RESULT = 170
- ERROR_NONE = 0
- These constants reflect the error codes to be used by the identity, they are copied from LSUserIdentity and CBaseUserIdentity for easier access.
- ERROR_NOT_ADDED = 5
- ERROR_PASSWORD_INVALID = 20
- ERROR_UNKNOWN_HANDLER = 99
- ERROR_UNKNOWN_IDENTITY = 100
- ERROR_USERNAME_INVALID = 10
- LDAP_INVALID_PASSWORD_TEXT = "INVALID_PASSWORD-LDAP_USER"
Properties
- $allowedPublicMethods : mixed
- $_password : mixed
- $_username : mixed
- $description : mixed
- $name : mixed
- $settings : mixed
- $storage : mixed
Methods
- afterLoginFormSubmit() : null
- Set username and password by post request
- beforeLogin() : mixed
- getAuthMethodName() : string
- Returns the authentication method's name
- getGlobalBasePermissions() : void
- Add AuthLDAP Permission to global Permission
- getPluginSettings() : array<string|int, mixed>
- Modified getPluginSettings to check for invalid settings
- init() : mixed
- newUserSession() : mixed
- remoteControlLogin() : null
- Set username and password by event
- setAuthFailure() : AuthPluginBase
- Set authentication result to failure.
- setAuthPlugin() : AuthPluginBase
- Set this plugin to handle the authentication
- setAuthSuccess() : AuthPluginBase
- Set authentication result to success for the given user object.
- getPassword() : string|null
- Get the password (if set)
- getUserName() : string|null
- Get the username (if set)
- setPassword() : AuthPluginBase
- Set the password to use for authentication
- setUsername() : AuthPluginBase
- Set the username to use for authentication
Constants
ERROR_ALREADY_EXISTING_USER
public
mixed
ERROR_ALREADY_EXISTING_USER
= 120
ERROR_AUTH_METHOD_INVALID
public
mixed
ERROR_AUTH_METHOD_INVALID
= 30
ERROR_INVALID_EMAIL
public
mixed
ERROR_INVALID_EMAIL
= 110
ERROR_IP_LOCKED_OUT
public
mixed
ERROR_IP_LOCKED_OUT
= 98
ERROR_LDAP_CONNECTION
public
mixed
ERROR_LDAP_CONNECTION
= 130
ERROR_LDAP_MODE
public
mixed
ERROR_LDAP_MODE
= 135
ERROR_LDAP_NO_BIND
public
mixed
ERROR_LDAP_NO_BIND
= 160
ERROR_LDAP_NO_EMAIL
public
mixed
ERROR_LDAP_NO_EMAIL
= 140
ERROR_LDAP_NO_FULLNAME
public
mixed
ERROR_LDAP_NO_FULLNAME
= 150
ERROR_LDAP_NO_SEARCH_RESULT
public
mixed
ERROR_LDAP_NO_SEARCH_RESULT
= 170
ERROR_NONE
These constants reflect the error codes to be used by the identity, they are copied from LSUserIdentity and CBaseUserIdentity for easier access.
public
mixed
ERROR_NONE
= 0
ERROR_NOT_ADDED
public
mixed
ERROR_NOT_ADDED
= 5
ERROR_PASSWORD_INVALID
public
mixed
ERROR_PASSWORD_INVALID
= 20
ERROR_UNKNOWN_HANDLER
public
mixed
ERROR_UNKNOWN_HANDLER
= 99
ERROR_UNKNOWN_IDENTITY
public
mixed
ERROR_UNKNOWN_IDENTITY
= 100
ERROR_USERNAME_INVALID
public
mixed
ERROR_USERNAME_INVALID
= 10
LDAP_INVALID_PASSWORD_TEXT
public
mixed
LDAP_INVALID_PASSWORD_TEXT
= "INVALID_PASSWORD-LDAP_USER"
Properties
$allowedPublicMethods
public
mixed
$allowedPublicMethods
= array()
Tags
$_password
protected
mixed
$_password
= null
$_username
protected
mixed
$_username
= null
$description
protected
static mixed
$description
= 'Core: Webserver authentication'
$name
protected
static mixed
$name
= 'Webserver'
$settings
protected
mixed
$settings
= array('strip_domain' => array('type' => 'checkbox', 'label' => 'Strip domain part (DOMAIN\\USER or USER@DOMAIN)'), 'serverkey' => array('type' => 'string', 'label' => 'Key to use for username e.g. PHP_AUTH_USER, LOGON_USER, REMOTE_USER. See phpinfo in global settings.', 'default' => 'REMOTE_USER'), 'is_default' => array('type' => 'checkbox', 'label' => 'Check to make default authentication method (This disable Default LimeSurvey authentification by database)', 'default' => \true))
$storage
protected
mixed
$storage
= 'DbStorage'
Methods
afterLoginFormSubmit()
Set username and password by post request
public
afterLoginFormSubmit() : null
Return values
nullbeforeLogin()
public
beforeLogin() : mixed
getAuthMethodName()
Returns the authentication method's name
public
static getAuthMethodName() : string
Return values
stringgetGlobalBasePermissions()
Add AuthLDAP Permission to global Permission
public
getGlobalBasePermissions() : void
getPluginSettings()
Modified getPluginSettings to check for invalid settings
public
getPluginSettings([bool $getValues = true ]) : array<string|int, mixed>
Parameters
- $getValues : bool = true
Return values
array<string|int, mixed>init()
public
init() : mixed
newUserSession()
public
newUserSession() : mixed
remoteControlLogin()
Set username and password by event
public
remoteControlLogin() : null
Return values
nullsetAuthFailure()
Set authentication result to failure.
public
setAuthFailure([int $code = self::ERROR_UNKNOWN_IDENTITY ][, string $message = '' ][, PluginEvent $event = null ]) : AuthPluginBase
Parameters
- $code : int = self::ERROR_UNKNOWN_IDENTITY
-
Any of the constants defined in this class
- $message : string = ''
-
An optional message to return about the failure
- $event : PluginEvent = null
Return values
AuthPluginBasesetAuthPlugin()
Set this plugin to handle the authentication
public
setAuthPlugin([PluginEvent $event = null ]) : AuthPluginBase
Parameters
- $event : PluginEvent = null
Return values
AuthPluginBasesetAuthSuccess()
Set authentication result to success for the given user object.
public
setAuthSuccess(User $user[, PluginEvent $event = null ]) : AuthPluginBase
Parameters
- $user : User
- $event : PluginEvent = null
Return values
AuthPluginBasegetPassword()
Get the password (if set)
protected
getPassword() : string|null
Return values
string|nullgetUserName()
Get the username (if set)
protected
getUserName() : string|null
Return values
string|nullsetPassword()
Set the password to use for authentication
protected
setPassword(string $password) : AuthPluginBase
Parameters
- $password : string
Return values
AuthPluginBasesetUsername()
Set the username to use for authentication
protected
setUsername(string $username) : AuthPluginBase
Parameters
- $username : string
-
The username