Documentation

Http extends AbstractAuth
in package
Uses AdapterUserTrait

Http auth class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
4.0.0

Table of Contents

Constants

NOT_VALID  = 0
Constant for auth result
VALID  = 1

Properties

$client  : Client
Auth client
$password  : string|null
Authentication password
$passwordField  : string
Password field
$result  : int
Authentication result
$user  : mixed
User data
$username  : string|null
Authentication username
$usernameField  : string
Username field

Methods

__construct()  : mixed
Constructor
authenticate()  : int
Method to authenticate
client()  : Client
Get client (alias method)
getClient()  : Client
Get client
getPassword()  : string|null
Get the password
getPasswordField()  : string
Get the password field
getResult()  : int
Get the authentication result
getResultResponse()  : mixed
Get result response
getUser()  : mixed
Get the user record
getUsername()  : string|null
Get the username
getUsernameField()  : string
Get the username field
hasClient()  : bool
Has client
isAuthenticated()  : bool
Determine if the authentication attempt was successful
setClient()  : Http
Set client
setPassword()  : Http
Set the password
setPasswordField()  : static
Set the password field
setUsername()  : Http
Set the username
setUsernameField()  : static
Set the username field
verify()  : bool
Method to verify a password against a hash

Constants

NOT_VALID

Constant for auth result

public int NOT_VALID = 0

Properties

$password

Authentication password

protected string|null $password = null

$passwordField

Password field

protected string $passwordField = 'password'

$username

Authentication username

protected string|null $username = null

$usernameField

Username field

protected string $usernameField = 'username'

Methods

__construct()

Constructor

public __construct() : mixed

Instantiate the Http auth adapter object

authenticate()

Method to authenticate

public authenticate([string|null $username = null ][, string|null $password = null ]) : int
Parameters
$username : string|null = null
$password : string|null = null
Return values
int

getPassword()

Get the password

public getPassword() : string|null
Return values
string|null

getPasswordField()

Get the password field

public getPasswordField() : string
Return values
string

getResult()

Get the authentication result

public getResult() : int
Return values
int

getResultResponse()

Get result response

public getResultResponse() : mixed

getUsername()

Get the username

public getUsername() : string|null
Return values
string|null

getUsernameField()

Get the username field

public getUsernameField() : string
Return values
string

hasClient()

Has client

public hasClient() : bool
Return values
bool

isAuthenticated()

Determine if the authentication attempt was successful

public isAuthenticated() : bool
Return values
bool

setPassword()

Set the password

public setPassword(string $password) : Http
Parameters
$password : string
Return values
Http

setPasswordField()

Set the password field

public setPasswordField(string $passwordField) : static
Parameters
$passwordField : string
Return values
static

setUsername()

Set the username

public setUsername(string $username) : Http
Parameters
$username : string
Return values
Http

setUsernameField()

Set the username field

public setUsernameField(string $usernameField) : static
Parameters
$usernameField : string
Return values
static

verify()

Method to verify a password against a hash

public verify(string $password, string $hash) : bool
Parameters
$password : string
$hash : string
Return values
bool

        
On this page

Search results