PHP 인터페이스 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)
파일 보기
프로젝트 열기: trianglman/sqrl
공개 메소드들
메소드 |
설명 |
|
__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 |
|
메소드 상세
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 |
리턴 |
Trianglman\Sqrl\SqrlRequestHandlerInterface |
|
Currently the spec only uses the 200 code with the TIF containing a protocol status code
getResponseMessage()
공개 메소드
Gets the text message to be returned to the SQRL client
This will determine what type of request is being performed and set values
up for use in validation and creating the response.
A helper function to send the response message and code to the SQRL client