PHP Class Trianglman\Sqrl\SqrlGenerate

Author: johnj
Inheritance: implements Trianglman\Sqrl\SqrlGenerateInterface
Afficher le fichier Open project: trianglman/sqrl Class Usage Examples

Protected Properties

Свойство Type Description
$configuration SqrlConfiguration
$nonce
$store SqrlStore

Méthodes publiques

Méthode Description
__construct ( SqrlConfiguration $config, Trianglman\Sqrl\SqrlStoreInterface $storage )
generateQry ( )
getNonce ( integer $action, string $key = '', string $previousNonce = '' ) : string Returns the generated nonce
getUrl ( )
render ( $outputFile )

Méthodes protégées

Méthode Description
generateNonce ( integer $action, string $key = '', string $previousNonce = '' ) : string Generates a random, one time use key to be used in the sqrl validation

Method Details

__construct() public méthode

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

generateNonce() protected méthode

The implementation of this may get more complicated depending on the requirements detailed in any reference implementation. Users wanting to make this library more (or less) secure should override this function to strengthen (or weaken) the randomness of the generation.
protected generateNonce ( integer $action, string $key = '', string $previousNonce = '' ) : string
$action integer [Optional] The type of action this nonce is being generated for
$key string [Optional] The public key associated with the nonce
$previousNonce string [Optional] The previous nonce in the transaction that should be associated to this nonce
Résultat string

generateQry() public méthode

public generateQry ( )

getNonce() public méthode

Returns the generated nonce
public getNonce ( integer $action, string $key = '', string $previousNonce = '' ) : string
$action integer [Optional] The type of action this nonce is being generated for
$key string [Optional] The public key associated with the nonce
$previousNonce string [Optional] The previous nonce in the transaction that should be associated to this nonce
Résultat string The one time use string for the QR link

getUrl() public méthode

public getUrl ( )

render() public méthode

public render ( $outputFile )

Property Details

$configuration protected_oe property

protected SqrlConfiguration,Trianglman\Sqrl $configuration
Résultat SqrlConfiguration

$nonce protected_oe property

protected $nonce

$store protected_oe property

protected SqrlStore $store
Résultat SqrlStore