Firehed / u2f-php

An implementation of the FIDO U2F server protocol in PHP
MIT License
73 stars 9 forks source link

New server authorization flow #32

Closed Firehed closed 3 years ago

Firehed commented 3 years ago

This replaces

$server->setRegistrations([$registration])
    ->setSignRequests([$request])
    ->authenticate($response);

with $server->validateLogin($request, $response, [$registration]). Like #30, this aims to make the server less stateful and subsequently less error-prone.

codecov[bot] commented 3 years ago

Codecov Report

Merging #32 (ed0b089) into master (52234e4) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##              master       #32   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       138       139    +1     
===========================================
  Files             22        22           
  Lines            554       555    +1     
===========================================
+ Hits             554       555    +1     
Impacted Files Coverage Δ
src/Server.php 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 52234e4...ed0b089. Read the comment docs.