PHP Класс Trianglman\Sqrl\SqrlValidate

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.
Автор: johnj
Наследование: implements Trianglman\Sqrl\SqrlValidateInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$configuration SqrlConfiguration
$store Trianglman\Sqrl\SqrlStoreInterface
$validator Trianglman\Sqrl\NonceValidatorInterface

Открытые методы

Метод Описание
__construct ( SqrlConfiguration $config, Trianglman\Sqrl\NonceValidatorInterface $validator, Trianglman\Sqrl\SqrlStoreInterface $storage )
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)

Защищенные методы

Метод Описание
generateQry ( $nut ) : string This should eventually become a trait and share the functionality with SqrlGenerate instead of being duplicate code
getUrl ( $nut ) : string This should eventually become a trait and share the functionality with SqrlGenerate instead of being duplicate code

Описание методов

__construct() публичный Метод

public __construct ( SqrlConfiguration $config, Trianglman\Sqrl\NonceValidatorInterface $validator, Trianglman\Sqrl\SqrlStoreInterface $storage )
$config SqrlConfiguration
$validator Trianglman\Sqrl\NonceValidatorInterface
$storage Trianglman\Sqrl\SqrlStoreInterface

generateQry() защищенный Метод

This should eventually become a trait and share the functionality with SqrlGenerate instead of being duplicate code
protected generateQry ( $nut ) : string
Результат string

getUrl() защищенный Метод

This should eventually become a trait and share the functionality with SqrlGenerate instead of being duplicate code
protected getUrl ( $nut ) : string
Результат string

nutIPMatches() публичный Метод

Verifies the original nut's IP matches the current IP
public nutIPMatches ( string $nut, string $ip ) : boolean
$nut string
$ip string
Результат boolean

validateNut() публичный Метод

Validates a supplied nut
public validateNut ( string $nut, string $signingKey = null ) : integer
$nut string
$signingKey string The key used to sign the current request
Результат integer One of the nut class constants

validateServer() публичный Метод

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
Результат boolean

validateSignature() публичный Метод

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
Результат boolean

Описание свойств

$configuration защищенное свойство

protected SqrlConfiguration,Trianglman\Sqrl $configuration
Результат SqrlConfiguration

$store защищенное свойство

protected SqrlStoreInterface,Trianglman\Sqrl $store
Результат Trianglman\Sqrl\SqrlStoreInterface

$validator защищенное свойство

protected NonceValidatorInterface,Trianglman\Sqrl $validator
Результат Trianglman\Sqrl\NonceValidatorInterface