AuthHandler
in package
implements
HandlerInterface
SMTP auth handler class
Tags
Interfaces, Classes and Traits
- HandlerInterface
- SMTP handler interface
Table of Contents
- $authenticators : array<string|int, mixed>
- Authenticators available to process the request.
- $authMode : string
- The auth mode for authentication
- $esmtpParams : array<string|int, mixed>
- The ESMTP AUTH parameters available
- $password : string
- The password for authentication
- $username : string
- The username for authentication
- __construct() : mixed
- Create a new AuthHandler with $authenticators for support
- afterEhlo() : mixed
- Runs immediately after a EHLO has been issued
- getAuthenticators() : array<string|int, mixed>
- Get the Authenticators which can process a login request
- getAuthMode() : string
- Get the auth mode to use to authenticate
- getHandledKeyword() : bool
- Get the name of the ESMTP extension this handles
- getMailParams() : array<string|int, string>
- Not used
- getPassword() : string
- Get the password to authenticate with
- getPriorityOver() : int
- Returns +1, -1 or 0 according to the rules for usort().
- getRcptParams() : array<string|int, string>
- Not used
- getUsername() : string
- Get the username to authenticate with
- onCommand() : mixed
- Not used
- resetState() : mixed
- Not used
- setAuthenticators() : mixed
- Set the Authenticators which can process a login request
- setAuthMode() : mixed
- Set the auth mode to use to authenticate
- setKeywordParams() : mixed
- Set the parameters which the EHLO greeting indicated
- setPassword() : mixed
- Set the password to authenticate with
- setUsername() : mixed
- Set the username to authenticate with
- getAuthenticatorsForAgent() : array<string|int, mixed>
- Returns the authenticator list for the given agent
Properties
$authenticators
Authenticators available to process the request.
private
array<string|int, mixed>
$authenticators
= []
$authMode
The auth mode for authentication
private
string
$authMode
$esmtpParams
The ESMTP AUTH parameters available
private
array<string|int, mixed>
$esmtpParams
= []
$password
The password for authentication
private
string
$password
$username
The username for authentication
private
string
$username
Methods
__construct()
Create a new AuthHandler with $authenticators for support
public
__construct(array<string|int, mixed> $authenticators) : mixed
Parameters
- $authenticators : array<string|int, mixed>
Return values
mixed —afterEhlo()
Runs immediately after a EHLO has been issued
public
afterEhlo(AgentInterface $agent) : mixed
Parameters
- $agent : AgentInterface
-
to read/write
Tags
Return values
mixed —getAuthenticators()
Get the Authenticators which can process a login request
public
getAuthenticators() : array<string|int, mixed>
Return values
array<string|int, mixed> —getAuthMode()
Get the auth mode to use to authenticate
public
getAuthMode() : string
Return values
string —getHandledKeyword()
Get the name of the ESMTP extension this handles
public
getHandledKeyword() : bool
Return values
bool —getMailParams()
Not used
public
getMailParams() : array<string|int, string>
Return values
array<string|int, string> —getPassword()
Get the password to authenticate with
public
getPassword() : string
Return values
string —getPriorityOver()
Returns +1, -1 or 0 according to the rules for usort().
public
getPriorityOver(string $esmtpKeyword) : int
This method is called to ensure extensions can be execute in an appropriate order.
Parameters
- $esmtpKeyword : string
-
to compare with
Return values
int —getRcptParams()
Not used
public
getRcptParams() : array<string|int, string>
Return values
array<string|int, string> —getUsername()
Get the username to authenticate with
public
getUsername() : string
Return values
string —onCommand()
Not used
public
onCommand(AgentInterface $agent, string $command[, array<string|int, mixed> $codes = [] ][, bool &$stop = false ]) : mixed
Parameters
- $agent : AgentInterface
- $command : string
- $codes : array<string|int, mixed> = []
- $stop : bool = false
Return values
mixed —resetState()
Not used
public
resetState() : mixed
Return values
mixed —setAuthenticators()
Set the Authenticators which can process a login request
public
setAuthenticators(array<string|int, mixed> $authenticators) : mixed
Parameters
- $authenticators : array<string|int, mixed>
Return values
mixed —setAuthMode()
Set the auth mode to use to authenticate
public
setAuthMode(string $mode) : mixed
Parameters
- $mode : string
Return values
mixed —setKeywordParams()
Set the parameters which the EHLO greeting indicated
public
setKeywordParams(array<string|int, mixed> $parameters) : mixed
Parameters
- $parameters : array<string|int, mixed>
Return values
mixed —setPassword()
Set the password to authenticate with
public
setPassword(string $password) : mixed
Parameters
- $password : string
Return values
mixed —setUsername()
Set the username to authenticate with
public
setUsername(string $username) : mixed
Parameters
- $username : string
Return values
mixed —getAuthenticatorsForAgent()
Returns the authenticator list for the given agent
protected
getAuthenticatorsForAgent() : array<string|int, mixed>