PHP Class Trianglman\Sqrl\SqrlConfiguration

Author: luisc
Mostrar archivo Open project: trianglman/sqrl Class Usage Examples

Protected Properties

Property Type Description
$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

Public Methods

Method Description
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

Protected Methods

Method Description
loadConfigFromJSON ( $filePath )

Method Details

getAcceptedVersions() public method

Gets the versions this SQRL server supports
public getAcceptedVersions ( ) : array
return array

getAnonAllowed() public method

Gets whether users are allowed to generate anonymous accounts
public getAnonAllowed ( ) : boolean
return boolean

getAuthenticationPath() public method

Gets the path to the authentication script
public getAuthenticationPath ( ) : string
return string

getDomain() public method

Gets the domain clients should generate a key for
public getDomain ( ) : string
return string

getFriendlyName() public method

Gets the friendly name displayed to SQRL clients during authentication
public getFriendlyName ( ) : string
return string

getNonceMaxAge() public method

Gets the time in minutes that a nonce is considered valid
public getNonceMaxAge ( ) : integer
return integer

getNonceSalt() public method

Gets the random string used to salt generated nonces
public getNonceSalt ( ) : string
return string

getQrHeight() public method

Gets the height, in pixels, of a generated QR code
public getQrHeight ( ) : integer
return integer

getQrPadding() public method

Gets the padding, in pixels, around a generated QR code
public getQrPadding ( ) : integer
return integer

getSecure() public method

Gets whether responses to the server should be secure
public getSecure ( ) : boolean
return boolean

load() public method

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

loadConfigFromJSON() protected method

protected loadConfigFromJSON ( $filePath )

setAcceptedVersions() public method

Sets the versions this SQRL server supports
public setAcceptedVersions ( mixed $acceptedVersions ) : SqrlConfiguration
$acceptedVersions mixed
return SqrlConfiguration

setAnonAllowed() public method

Sets whether users are allowed to generate anonymous accounts
public setAnonAllowed ( boolean $anonAllowed ) : SqrlConfiguration
$anonAllowed boolean
return SqrlConfiguration

setAuthenticationPath() public method

Sets the path to the authentication script
public setAuthenticationPath ( string $authenticationPath ) : SqrlConfiguration
$authenticationPath string
return SqrlConfiguration

setDomain() public method

Sets the domain clients should generate a key for
public setDomain ( string $domain ) : SqrlConfiguration
$domain string
return SqrlConfiguration

setFriendlyName() public method

Sets the friendly name displayed to SQRL clients during authentication
public setFriendlyName ( string $friendlyName ) : SqrlConfiguration
$friendlyName string
return SqrlConfiguration

setNonceMaxAge() public method

Sets the time in minutes that a nonce is considered valid
public setNonceMaxAge ( integer $nonceMaxAge ) : SqrlConfiguration
$nonceMaxAge integer
return SqrlConfiguration

setNonceSalt() public method

Sets the random string used to salt generated nonces
public setNonceSalt ( string $nonceSalt ) : SqrlConfiguration
$nonceSalt string
return SqrlConfiguration

setQrHeight() public method

Sets the height, in pixels, of a generated QR code
public setQrHeight ( integer $qrHeight ) : SqrlConfiguration
$qrHeight integer
return SqrlConfiguration

setQrPadding() public method

Sets the padding, in pixels, around a generated QR code
public setQrPadding ( integer $qrPadding ) : SqrlConfiguration
$qrPadding integer
return SqrlConfiguration

setSecure() public method

Sets whether responses to the server should be secure
public setSecure ( boolean $secure ) : SqrlConfiguration
$secure boolean
return SqrlConfiguration

Property Details

$acceptedVersions protected_oe property

Defaults to only accepting version 1
protected array[]mixed $acceptedVersions
return array[]mixed

$anonAllowed protected_oe property

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
return boolean

$authenticationPath protected_oe property

Required if generating SQRL URLs and validating responses
protected string $authenticationPath
return string

$domain protected_oe property

Required if generating the SQRL URLs and validating responses
protected string $domain
return string

$friendlyName protected_oe property

Required
protected string $friendlyName
return string

$nonceMaxAge protected_oe property

Default 5
protected int $nonceMaxAge
return integer

$nonceSalt protected_oe property

Random string used to salt generated nonces
protected string $nonceSalt
return string

$qrHeight protected_oe property

Default 300
protected int $qrHeight
return integer

$qrPadding protected_oe property

Default 10
protected int $qrPadding
return integer

$secure protected_oe property

Defaults to false
protected bool $secure
return boolean