Documentation

File extends AbstractAuth
in package

File 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

$delimiter  : string
Auth file delimiter
$filename  : string|null
Auth file
$password  : string|null
Authentication password
$realm  : string|null
Auth realm
$result  : int
Authentication result
$username  : string|null
Authentication username

Methods

__construct()  : mixed
Constructor
authenticate()  : int
Method to authenticate
getDelimiter()  : string
Get the auth file delimiter
getFilename()  : string
Get the auth filename
getPassword()  : string|null
Get the password
getRealm()  : string|null
Get the auth realm
getResult()  : int
Get the authentication result
getUsername()  : string|null
Get the username
isAuthenticated()  : bool
Determine if the authentication attempt was successful
setDelimiter()  : File
Set the auth file delimiter
setFilename()  : File
Set the auth filename
setPassword()  : AbstractAuth
Set the password
setRealm()  : File
Set the auth realm
setUsername()  : AbstractAuth
Set the username
verify()  : bool
Method to verify a password against a hash

Constants

NOT_VALID

Constant for auth result

public int NOT_VALID = 0

Properties

$delimiter

Auth file delimiter

protected string $delimiter = ':'

$filename

Auth file

protected string|null $filename = null

$password

Authentication password

protected string|null $password = null

$realm

Auth realm

protected string|null $realm = null

$username

Authentication username

protected string|null $username = null

Methods

__construct()

Constructor

public __construct(string $filename[, string|null $realm = null ][, string $delimiter = ':' ]) : mixed

Instantiate the File auth adapter object

Parameters
$filename : string
$realm : string|null = null
$delimiter : string = ':'
Tags
throws
Exception

authenticate()

Method to authenticate

public authenticate(string $username, string $password) : int
Parameters
$username : string
$password : string
Return values
int

getDelimiter()

Get the auth file delimiter

public getDelimiter() : string
Return values
string

getFilename()

Get the auth filename

public getFilename() : string
Return values
string

getPassword()

Get the password

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

getRealm()

Get the auth realm

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

getResult()

Get the authentication result

public getResult() : int
Return values
int

getUsername()

Get the username

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

isAuthenticated()

Determine if the authentication attempt was successful

public isAuthenticated() : bool
Return values
bool

setDelimiter()

Set the auth file delimiter

public setDelimiter(string $delimiter) : File
Parameters
$delimiter : string
Return values
File

setFilename()

Set the auth filename

public setFilename(string $filename) : File
Parameters
$filename : string
Tags
throws
Exception
Return values
File

setRealm()

Set the auth realm

public setRealm(string $realm) : File
Parameters
$realm : string
Return values
File

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