Documentation

AbstractAuth
in package
implements AuthInterface

AbstractYes

Abstract 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

Interfaces

AuthInterface
Auth interface

Constants

NOT_VALID  = 0
Constant for auth result
VALID  = 1

Properties

$password  : string|null
Authentication password
$result  : int
Authentication result
$username  : string|null
Authentication username

Methods

authenticate()  : int
Method to authenticate
getPassword()  : string|null
Get the password
getResult()  : int
Get the authentication result
getUsername()  : string|null
Get the username
isAuthenticated()  : bool
Determine if the authentication attempt was successful
setPassword()  : AbstractAuth
Set the password
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

$password

Authentication password

protected string|null $password = null

$username

Authentication username

protected string|null $username = null

Methods

authenticate()

Method to authenticate

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

getPassword()

Get the password

public getPassword() : 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

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