PHP Class Trianglman\Sqrl\SqrlConfiguration

Author: luisc
Afficher le fichier Open project: trianglman/sqrl Class Usage Examples

Protected Properties

Свойство 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

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
loadConfigFromJSON ( $filePath )

Method Details

getAcceptedVersions() public méthode

Gets the versions this SQRL server supports
public getAcceptedVersions ( ) : array
Résultat array

getAnonAllowed() public méthode

Gets whether users are allowed to generate anonymous accounts
public getAnonAllowed ( ) : boolean
Résultat boolean

getAuthenticationPath() public méthode

Gets the path to the authentication script
public getAuthenticationPath ( ) : string
Résultat string

getDomain() public méthode

Gets the domain clients should generate a key for
public getDomain ( ) : string
Résultat string

getFriendlyName() public méthode

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

getNonceMaxAge() public méthode

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

getNonceSalt() public méthode

Gets the random string used to salt generated nonces
public getNonceSalt ( ) : string
Résultat string

getQrHeight() public méthode

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

getQrPadding() public méthode

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

getSecure() public méthode

Gets whether responses to the server should be secure
public getSecure ( ) : boolean
Résultat boolean

load() public méthode

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

loadConfigFromJSON() protected méthode

protected loadConfigFromJSON ( $filePath )

setAcceptedVersions() public méthode

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

setAnonAllowed() public méthode

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

setAuthenticationPath() public méthode

Sets the path to the authentication script
public setAuthenticationPath ( string $authenticationPath ) : SqrlConfiguration
$authenticationPath string
Résultat SqrlConfiguration

setDomain() public méthode

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

setFriendlyName() public méthode

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

setNonceMaxAge() public méthode

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

setNonceSalt() public méthode

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

setQrHeight() public méthode

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

setQrPadding() public méthode

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

setSecure() public méthode

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

Property Details

$acceptedVersions protected_oe property

Defaults to only accepting version 1
protected array[]mixed $acceptedVersions
Résultat 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
Résultat boolean

$authenticationPath protected_oe property

Required if generating SQRL URLs and validating responses
protected string $authenticationPath
Résultat string

$domain protected_oe property

Required if generating the SQRL URLs and validating responses
protected string $domain
Résultat string

$friendlyName protected_oe property

Required
protected string $friendlyName
Résultat string

$nonceMaxAge protected_oe property

Default 5
protected int $nonceMaxAge
Résultat integer

$nonceSalt protected_oe property

Random string used to salt generated nonces
protected string $nonceSalt
Résultat string

$qrHeight protected_oe property

Default 300
protected int $qrHeight
Résultat integer

$qrPadding protected_oe property

Default 10
protected int $qrPadding
Résultat integer

$secure protected_oe property

Defaults to false
protected bool $secure
Résultat boolean