PHP Interface Trianglman\Sqrl\SqrlRequestHandlerInterface
This class will process a request, send it to the validator, then depending on
the type of request, send a success message, send an error message, or send a
request for more information (e.g. initiate the second loop to create a new user)
显示文件
Open project: trianglman/sqrl
Public Methods
Method |
Description |
|
__construct ( SqrlConfiguration $config, Trianglman\Sqrl\SqrlValidateInterface $val, Trianglman\Sqrl\SqrlStoreInterface $store = null, Trianglman\Sqrl\SqrlGenerateInterface $gen = null ) : Trianglman\Sqrl\SqrlRequestHandlerInterface |
Initializes the Request Handler |
|
getResponseCode ( ) : integer |
Gets the numeric HTTP code to return to the SQRL client |
|
getResponseMessage ( ) : string |
Gets the text message to be returned to the SQRL client |
|
parseRequest ( array $get, array $post, array $server ) : void |
Parses a user request |
|
sendResponse ( ) : void |
A helper function to send the response message and code to the SQRL client |
|
Method Details
__construct()
public method
Initializes the Request Handler
public __construct ( SqrlConfiguration $config, Trianglman\Sqrl\SqrlValidateInterface $val, Trianglman\Sqrl\SqrlStoreInterface $store = null, Trianglman\Sqrl\SqrlGenerateInterface $gen = null ) : Trianglman\Sqrl\SqrlRequestHandlerInterface |
$config |
SqrlConfiguration |
|
$val |
Trianglman\Sqrl\SqrlValidateInterface |
Sets the validator that will check the response |
$store |
Trianglman\Sqrl\SqrlStoreInterface |
[Optional] Sets storage for submitted authorization keys |
$gen |
Trianglman\Sqrl\SqrlGenerateInterface |
[Optional] Sets the nonce generator for loop two |
return |
Trianglman\Sqrl\SqrlRequestHandlerInterface |
|
getResponseCode()
public method
Currently the spec only uses the 200 code with the TIF containing a protocol status code
getResponseMessage()
public method
Gets the text message to be returned to the SQRL client
parseRequest()
public method
This will determine what type of request is being performed and set values
up for use in validation and creating the response.
sendResponse()
public method
A helper function to send the response message and code to the SQRL client