Methods summary
public
|
#
__construct( string $appId, string|null $attestDir = null )
Parameters
- $appId
- Application id for the running application
- $attestDir
- Directory where trusted attestation roots may be found
Throws
|
public
array
|
#
getRegisterData( array $registrations = array() )
Called to get a registration request to send to a user.
Returns an array of one registration request and a array of sign requests.
Called to get a registration request to send to a user.
Returns an array of one registration request and a array of sign requests.
Parameters
- $registrations
List of current registrations for this
user, to prevent the user from registering the same authenticator several
times.
Returns
array An array of two elements, the first containing a
RegisterRequest the second being an array of SignRequest
Throws
|
public
u2flib_server\Registration
|
#
doRegister( u2flib_server\RegisterRequest $request, object $response, boolean $includeCert = true )
Called to verify and unpack a registration message.
Called to verify and unpack a registration message.
Parameters
- $request
- this is a reply to
- $response
- response from a user
- $includeCert
set to true if the attestation certificate should be
included in the returned Registration object
Returns
Throws
|
public
array
|
#
getAuthenticateData( array $registrations )
Called to get an authentication request.
Called to get an authentication request.
Parameters
- $registrations
- An array of the registrations to create authentication requests for.
Returns
array An array of SignRequest
Throws
|
public
u2flib_server\Registration
|
#
doAuthenticate( array $requests, array $registrations, object $response )
Called to verify an authentication response
Called to verify an authentication response
Parameters
- $requests
- An array of outstanding authentication requests
- $registrations
- An array of current registrations
- $response
- A response from the authenticator
Returns
Throws
u2flib_server\Error The Registration object returned on success contains an updated counter
that should be saved for future authentications.
If the Error returned is ERR_COUNTER_TOO_LOW this is an indication of
token cloning or similar and appropriate action should be taken.
|