| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | interface EmailVerificationBrokerContract |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Constant representing a successfully sent verification email. |
||
| 13 | * |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | const LINK_SENT = 'messages.verification.email.link_sent'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Constant representing a successfully verified email. |
||
| 20 | * |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | const EMAIL_VERIFIED = 'messages.verification.email.verified'; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Constant representing an invalid user. |
||
| 27 | * |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | const INVALID_USER = 'messages.verification.email.invalid_user'; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Constant representing an invalid token. |
||
| 34 | * |
||
| 35 | * @var string |
||
| 36 | */ |
||
| 37 | const INVALID_TOKEN = 'messages.verification.email.invalid_token'; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Constant representing an expired token. |
||
| 41 | * |
||
| 42 | * @var string |
||
| 43 | */ |
||
| 44 | const EXPIRED_TOKEN = 'messages.verification.email.expired_token'; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Send a user email verification. |
||
| 48 | * |
||
| 49 | * @param array $credentials |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function sendVerificationLink(array $credentials): string; |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Verify given account. |
||
| 57 | * |
||
| 58 | * @param array $credentials |
||
| 59 | * @param \Closure|null $callback |
||
|
|
|||
| 60 | * |
||
| 61 | * @return mixed |
||
| 62 | */ |
||
| 63 | public function verify(array $credentials, Closure $callback); |
||
| 64 | } |
||
| 65 |