Documentation

AbstractAuth
in package
implements AuthInterface

Abstract auth class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

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

license

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

version
3.3.0

Interfaces, Classes and Traits

AuthInterface
Auth interface

Table of Contents

NOT_VALID  = 0
Constant for auth result
VALID  = 1
$password  : string
Authentication password
$result  : int
Authentication result
$username  : string
Authentication username
authenticate()  : int
Method to authenticate
getPassword()  : string
Get the password
getResult()  : int
Get the authentication result
getUsername()  : string
Get the username
isValid()  : bool
Determine if the authentication attempt was valid
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 = ""

Properties

$password

Authentication password

protected string $password = null

$username

Authentication username

protected string $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
Return values
string

getResult()

Get the authentication result

public getResult() : int
Return values
int

getUsername()

Get the username

public getUsername() : string
Return values
string

isValid()

Determine if the authentication attempt was valid

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

Search results