PHP Interface Trianglman\Sqrl\SqrlValidateInterface

If a database is configured, this will also check to see if the public key matches a previously encountered key. If it does it will load an identifier. If there is no match, it will store the public key and generate an identifier.
Author: johnj
Mostra file Open project: trianglman/sqrl

Public Methods

Method Description
nutIPMatches ( string $nut, string $ip ) : boolean Verifies the original nut's IP matches the current IP
validateNut ( string $nut, string $signingKey = null ) : integer Validates a supplied nut
validateServer ( string $server, string $nut, string $secure ) : boolean Validates the returned server value
validateSignature ( string $orig, string $key, string $sig ) : boolean Validates a secondary request signature (Unlock Request or New Key)

Method Details

nutIPMatches() public method

Verifies the original nut's IP matches the current IP
public nutIPMatches ( string $nut, string $ip ) : boolean
$nut string
$ip string
return boolean

validateNut() public method

Validates a supplied nut
public validateNut ( string $nut, string $signingKey = null ) : integer
$nut string
$signingKey string The key used to sign the current request
return integer One of the nut class constants

validateServer() public method

Validates the returned server value
public validateServer ( string $server, string $nut, string $secure ) : boolean
$server string The returned server value
$nut string The nut from the request
$secure string Whether the request was secure
return boolean

validateSignature() public method

Validates a secondary request signature (Unlock Request or New Key)
public validateSignature ( string $orig, string $key, string $sig ) : boolean
$orig string
$key string
$sig string
return boolean