| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\OATHAuth; |
| 4 | |
| 5 | use JsonSerializable; |
| 6 | use stdClass; |
| 7 | |
| 8 | interface IAuthKey extends JsonSerializable { |
| 9 | /** |
| 10 | * @return string The name of the module this key is attached to |
| 11 | * @see IModule::getName() |
| 12 | */ |
| 13 | public function getModule(): string; |
| 14 | |
| 15 | /** |
| 16 | * @return int|null the ID of this key in the oathauth_devices table, or null if this key has not been saved yet |
| 17 | */ |
| 18 | public function getId(): ?int; |
| 19 | |
| 20 | /** |
| 21 | * @param array|stdClass $data |
| 22 | * @param OATHUser $user |
| 23 | * @return bool |
| 24 | */ |
| 25 | public function verify( $data, OATHUser $user ); |
| 26 | } |