| Total Complexity | 5 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class MethodRegistrationHandler implements RegistrationHandlerInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Prepare to register this authentication method against a member by initialising state in session and generating |
||
| 12 | * details to provide to a frontend React component |
||
| 13 | * |
||
| 14 | * @param SessionStore $store An object that hold session data (and the Member) that can be mutated |
||
| 15 | * @return array Props to be passed to a front-end React component |
||
| 16 | */ |
||
| 17 | public function start(SessionStore $store) |
||
| 18 | { |
||
| 19 | // stub |
||
| 20 | return []; |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Confirm that the provided details are valid, and create a new AuthenticationMethod against the member. |
||
| 25 | * |
||
| 26 | * @param HTTPRequest $request |
||
| 27 | * @param SessionStore $store |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | public function register(HTTPRequest $request, SessionStore $store) |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Provide a string (possibly passed through i18n) that names this registration method. |
||
| 38 | * |
||
| 39 | * eg. "Authenticator app" |
||
| 40 | * |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | public function getName() |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Provide a string (possibly passed through i18n) that describes this method. |
||
| 50 | * |
||
| 51 | * eg. "Verification codes are created by an app on your phone" |
||
| 52 | * |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | public function getDescription() |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Provide a URL to a support article about this registration method. |
||
| 62 | * |
||
| 63 | * @return string |
||
| 64 | */ |
||
| 65 | public function getSupportLink() |
||
| 70 |