Methods summary
public
|
#
__construct( string $appId, string $attestDir = null )
Parameters
- $appId
string Application id for the running application
- $attestDir
string Directory where trusted attestation roots may be found
|
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
array optional list of current registrations for this user, to prevent the user from
registering the same authenticator serveral 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, RegisterResponse $response, boolean $include_cert = true )
Called to verify and unpack a registration message.
Called to verify and unpack a registration message.
Parameters
- $request
u2flib_server\RegisterRequest
request this is a reply to
- $response
RegisterResponse response from a user
- $include_cert
boolean 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
array 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, SignResponse $response )
Called to verify an authentication response
Called to verify an authentication response
Parameters
- $requests
array An array of outstanding authentication requests
- $registrations
array An array of current registrations
- $response
SignResponse 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.
|