PHP Класс Trianglman\Sqrl\SqrlConfiguration

Автор: luisc
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$acceptedVersions array[]mixed Defaults to only accepting version 1
$anonAllowed boolean If a user with an unrecognized identification key attempts to authenticate, should the site accept just the key as a user identification Defaults to false
$authenticationPath string Required if generating SQRL URLs and validating responses
$domain string Required if generating the SQRL URLs and validating responses
$friendlyName string Required
$nonceMaxAge integer Default 5
$nonceSalt string Random string used to salt generated nonces
$qrHeight integer Default 300
$qrPadding integer Default 10
$secure boolean Defaults to false

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

Метод Описание
getAcceptedVersions ( ) : array Gets the versions this SQRL server supports
getAnonAllowed ( ) : boolean Gets whether users are allowed to generate anonymous accounts
getAuthenticationPath ( ) : string Gets the path to the authentication script
getDomain ( ) : string Gets the domain clients should generate a key for
getFriendlyName ( ) : string Gets the friendly name displayed to SQRL clients during authentication
getNonceMaxAge ( ) : integer Gets the time in minutes that a nonce is considered valid
getNonceSalt ( ) : string Gets the random string used to salt generated nonces
getQrHeight ( ) : integer Gets the height, in pixels, of a generated QR code
getQrPadding ( ) : integer Gets the padding, in pixels, around a generated QR code
getSecure ( ) : boolean Gets whether responses to the server should be secure
load ( string $filePath ) Loads the configuration from the supplied file path
setAcceptedVersions ( mixed $acceptedVersions ) : SqrlConfiguration Sets the versions this SQRL server supports
setAnonAllowed ( boolean $anonAllowed ) : SqrlConfiguration Sets whether users are allowed to generate anonymous accounts
setAuthenticationPath ( string $authenticationPath ) : SqrlConfiguration Sets the path to the authentication script
setDomain ( string $domain ) : SqrlConfiguration Sets the domain clients should generate a key for
setFriendlyName ( string $friendlyName ) : SqrlConfiguration Sets the friendly name displayed to SQRL clients during authentication
setNonceMaxAge ( integer $nonceMaxAge ) : SqrlConfiguration Sets the time in minutes that a nonce is considered valid
setNonceSalt ( string $nonceSalt ) : SqrlConfiguration Sets the random string used to salt generated nonces
setQrHeight ( integer $qrHeight ) : SqrlConfiguration Sets the height, in pixels, of a generated QR code
setQrPadding ( integer $qrPadding ) : SqrlConfiguration Sets the padding, in pixels, around a generated QR code
setSecure ( boolean $secure ) : SqrlConfiguration Sets whether responses to the server should be secure

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

Метод Описание
loadConfigFromJSON ( $filePath )

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

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

Gets the versions this SQRL server supports
public getAcceptedVersions ( ) : array
Результат array

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

Gets whether users are allowed to generate anonymous accounts
public getAnonAllowed ( ) : boolean
Результат boolean

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

Gets the path to the authentication script
public getAuthenticationPath ( ) : string
Результат string

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

Gets the domain clients should generate a key for
public getDomain ( ) : string
Результат string

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

Gets the friendly name displayed to SQRL clients during authentication
public getFriendlyName ( ) : string
Результат string

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

Gets the time in minutes that a nonce is considered valid
public getNonceMaxAge ( ) : integer
Результат integer

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

Gets the random string used to salt generated nonces
public getNonceSalt ( ) : string
Результат string

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

Gets the height, in pixels, of a generated QR code
public getQrHeight ( ) : integer
Результат integer

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

Gets the padding, in pixels, around a generated QR code
public getQrPadding ( ) : integer
Результат integer

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

Gets whether responses to the server should be secure
public getSecure ( ) : boolean
Результат boolean

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

Loads the configuration from the supplied file path
public load ( string $filePath )
$filePath string The file to load

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

protected loadConfigFromJSON ( $filePath )

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

Sets the versions this SQRL server supports
public setAcceptedVersions ( mixed $acceptedVersions ) : SqrlConfiguration
$acceptedVersions mixed
Результат SqrlConfiguration

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

Sets whether users are allowed to generate anonymous accounts
public setAnonAllowed ( boolean $anonAllowed ) : SqrlConfiguration
$anonAllowed boolean
Результат SqrlConfiguration

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

Sets the path to the authentication script
public setAuthenticationPath ( string $authenticationPath ) : SqrlConfiguration
$authenticationPath string
Результат SqrlConfiguration

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

Sets the domain clients should generate a key for
public setDomain ( string $domain ) : SqrlConfiguration
$domain string
Результат SqrlConfiguration

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

Sets the friendly name displayed to SQRL clients during authentication
public setFriendlyName ( string $friendlyName ) : SqrlConfiguration
$friendlyName string
Результат SqrlConfiguration

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

Sets the time in minutes that a nonce is considered valid
public setNonceMaxAge ( integer $nonceMaxAge ) : SqrlConfiguration
$nonceMaxAge integer
Результат SqrlConfiguration

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

Sets the random string used to salt generated nonces
public setNonceSalt ( string $nonceSalt ) : SqrlConfiguration
$nonceSalt string
Результат SqrlConfiguration

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

Sets the height, in pixels, of a generated QR code
public setQrHeight ( integer $qrHeight ) : SqrlConfiguration
$qrHeight integer
Результат SqrlConfiguration

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

Sets the padding, in pixels, around a generated QR code
public setQrPadding ( integer $qrPadding ) : SqrlConfiguration
$qrPadding integer
Результат SqrlConfiguration

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

Sets whether responses to the server should be secure
public setSecure ( boolean $secure ) : SqrlConfiguration
$secure boolean
Результат SqrlConfiguration

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

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

Defaults to only accepting version 1
protected array[]mixed $acceptedVersions
Результат array[]mixed

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

If a user with an unrecognized identification key attempts to authenticate, should the site accept just the key as a user identification Defaults to false
protected bool $anonAllowed
Результат boolean

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

Required if generating SQRL URLs and validating responses
protected string $authenticationPath
Результат string

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

Required if generating the SQRL URLs and validating responses
protected string $domain
Результат string

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

Required
protected string $friendlyName
Результат string

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

Default 5
protected int $nonceMaxAge
Результат integer

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

Random string used to salt generated nonces
protected string $nonceSalt
Результат string

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

Default 300
protected int $qrHeight
Результат integer

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

Default 10
protected int $qrPadding
Результат integer

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

Defaults to false
protected bool $secure
Результат boolean