From 4a9aa20415b04b3a17ddc6fd9947751d0a5a60f8 Mon Sep 17 00:00:00 2001 From: begimov Date: Wed, 19 Jun 2019 16:37:07 +0300 Subject: [PATCH] docs updated --- README.md | 30 +---------------- docs/index.md | 89 ++++++++++++++++++++++++--------------------------- 2 files changed, 43 insertions(+), 76 deletions(-) diff --git a/README.md b/README.md index fff13d3..6044843 100644 --- a/README.md +++ b/README.md @@ -184,35 +184,7 @@ You can disable registration: AwesAuth::routes(['register' => false]); ``` -Package will register several routes: - -``` -+--------+----------------------------------------+--------------------------+--------------------------+----------------------------------------------------------------------+--------------------------------------------------------+ -| Domain | Method | URI | Name | Action | Middleware | -+--------+----------------------------------------+--------------------------+--------------------------+----------------------------------------------------------------------+--------------------------------------------------------+ -| | GET|HEAD | email/resend | verification.resend | AwesIO\Auth\Controllers\VerificationController@resend | web,throttle:1,0.2,auth,throttle:6,1 | -| | POST | email/verify | verification.code.verify | AwesIO\Auth\Controllers\VerificationController@verifyCode | web,auth | -| | GET|HEAD | email/verify | verification.code | AwesIO\Auth\Controllers\VerificationController@show | web,auth | -| | GET|HEAD | email/verify/{id} | verification.verify | AwesIO\Auth\Controllers\VerificationController@verify | web,auth,signed,throttle:6,1 | -| | POST | login | | AwesIO\Auth\Controllers\LoginController@login | web,guest | -| | GET|HEAD | login | login | AwesIO\Auth\Controllers\LoginController@showLoginForm | web,guest | -| | POST | login/twofactor/verify | login.twofactor.verify | AwesIO\Auth\Controllers\TwoFactorLoginController@verify | web,guest | -| | GET|HEAD | login/twofactor/verify | login.twofactor.index | AwesIO\Auth\Controllers\TwoFactorLoginController@index | web,guest | -| | GET|HEAD | login/{service} | login.social | AwesIO\Auth\Controllers\SocialLoginController@redirect | web,guest,AwesIO\Auth\Middlewares\SocialAuthentication | -| | GET|HEAD | login/{service}/callback | | AwesIO\Auth\Controllers\SocialLoginController@callback | web,guest,AwesIO\Auth\Middlewares\SocialAuthentication | -| | GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | logout | logout | AwesIO\Auth\Controllers\LoginController@logout | web | -| | POST | password/email | password.email | AwesIO\Auth\Controllers\ForgotPasswordController@sendResetLinkEmail | web,guest | -| | POST | password/reset | password.update | AwesIO\Auth\Controllers\ResetPasswordController@reset | web,guest | -| | GET|HEAD | password/reset | password.request | AwesIO\Auth\Controllers\ForgotPasswordController@showLinkRequestForm | web,guest | -| | GET|HEAD | password/reset/{token} | password.reset | AwesIO\Auth\Controllers\ResetPasswordController@showResetForm | web,guest | -| | POST | register | | AwesIO\Auth\Controllers\RegisterController@register | web,guest | -| | GET|HEAD | register | register | AwesIO\Auth\Controllers\RegisterController@showRegistrationForm | web,guest | -| | GET|HEAD | twofactor | twofactor.index | AwesIO\Auth\Controllers\TwoFactorController@index | web,auth | -| | POST | twofactor | twofactor.store | AwesIO\Auth\Controllers\TwoFactorController@store | web,auth | -| | DELETE | twofactor | twofactor.destroy | AwesIO\Auth\Controllers\TwoFactorController@destroy | web,auth | -| | POST | twofactor/verify | twofactor.verify | AwesIO\Auth\Controllers\TwoFactorController@verify | web,auth | -+--------+----------------------------------------+--------------------------+--------------------------+----------------------------------------------------------------------+--------------------------------------------------------+ -``` +Package will register several routes. ##### Besides default authentication routes, it will add: * Socialite routes diff --git a/docs/index.md b/docs/index.md index 6814844..5e25bfa 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,15 @@ -# Auth +

Authentication

-Laravel Auth package with buit-in two-factor (Authy) and social authentication (Socialite). +

Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).

+ +## Table of Contents + +- Installation +- Configuration + - Social and two-factor authentication + - Email verification & resetting passwords +- Usage +- Testing ## Installation @@ -127,57 +136,43 @@ You can disable registration: AwesAuth::routes(['register' => false]); ``` -Package will register several routes: +Package will register several routes. + +##### Besides default authentication routes, it will add: +* Socialite routes + * `'login.social'` + * `'login/{service}/callback'` +* Two factor authentication setup routes + * `'twofactor.index'` + * `'twofactor.store'` + * `'twofactor.destroy'` + * `'twofactor.verify'` +* Two factor authentication login routes + * `'login.twofactor.index'` + * `'login.twofactor.verify'` +* Email verification routes + * `'verification.resend'` + * `'verification.code.verify'` + * `'verification.code'` + * `'verification.verify'` -``` -+--------+----------------------------------------+--------------------------+--------------------------+----------------------------------------------------------------------+--------------------------------------------------------+ -| Domain | Method | URI | Name | Action | Middleware | -+--------+----------------------------------------+--------------------------+--------------------------+----------------------------------------------------------------------+--------------------------------------------------------+ -| | GET|HEAD | email/resend | verification.resend | AwesIO\Auth\Controllers\VerificationController@resend | web,throttle:1,0.2,auth,throttle:6,1 | -| | POST | email/verify | verification.code.verify | AwesIO\Auth\Controllers\VerificationController@verifyCode | web,auth | -| | GET|HEAD | email/verify | verification.code | AwesIO\Auth\Controllers\VerificationController@show | web,auth | -| | GET|HEAD | email/verify/{id} | verification.verify | AwesIO\Auth\Controllers\VerificationController@verify | web,auth,signed,throttle:6,1 | -| | POST | login | | AwesIO\Auth\Controllers\LoginController@login | web,guest | -| | GET|HEAD | login | login | AwesIO\Auth\Controllers\LoginController@showLoginForm | web,guest | -| | POST | login/twofactor/verify | login.twofactor.verify | AwesIO\Auth\Controllers\TwoFactorLoginController@verify | web,guest | -| | GET|HEAD | login/twofactor/verify | login.twofactor.index | AwesIO\Auth\Controllers\TwoFactorLoginController@index | web,guest | -| | GET|HEAD | login/{service} | login.social | AwesIO\Auth\Controllers\SocialLoginController@redirect | web,guest,AwesIO\Auth\Middlewares\SocialAuthentication | -| | GET|HEAD | login/{service}/callback | | AwesIO\Auth\Controllers\SocialLoginController@callback | web,guest,AwesIO\Auth\Middlewares\SocialAuthentication | -| | GET|HEAD|POST|PUT|PATCH|DELETE|OPTIONS | logout | logout | AwesIO\Auth\Controllers\LoginController@logout | web | -| | POST | password/email | password.email | AwesIO\Auth\Controllers\ForgotPasswordController@sendResetLinkEmail | web,guest | -| | POST | password/reset | password.update | AwesIO\Auth\Controllers\ResetPasswordController@reset | web,guest | -| | GET|HEAD | password/reset | password.request | AwesIO\Auth\Controllers\ForgotPasswordController@showLinkRequestForm | web,guest | -| | GET|HEAD | password/reset/{token} | password.reset | AwesIO\Auth\Controllers\ResetPasswordController@showResetForm | web,guest | -| | POST | register | | AwesIO\Auth\Controllers\RegisterController@register | web,guest | -| | GET|HEAD | register | register | AwesIO\Auth\Controllers\RegisterController@showRegistrationForm | web,guest | -| | GET|HEAD | twofactor | twofactor.index | AwesIO\Auth\Controllers\TwoFactorController@index | web,auth | -| | POST | twofactor | twofactor.store | AwesIO\Auth\Controllers\TwoFactorController@store | web,auth | -| | DELETE | twofactor | twofactor.destroy | AwesIO\Auth\Controllers\TwoFactorController@destroy | web,auth | -| | POST | twofactor/verify | twofactor.verify | AwesIO\Auth\Controllers\TwoFactorController@verify | web,auth | -+--------+----------------------------------------+--------------------------+--------------------------+----------------------------------------------------------------------+--------------------------------------------------------+ -``` +## Testing -Besides default authentication routes, it will add: +You can run the tests with: -```php -# Socialite routes -'login.social' -'login/{service}/callback' +```bash +composer test +``` -# Two factor authentication setup routes -'twofactor.index', 'twofactor.store', 'twofactor.destroy', 'twofactor.verify' +## Contributing -# Two factor authentication login routes -'login.twofactor.index', 'login.twofactor.verify' +Please see [contributing.md](contributing.md) for details and a todolist. -# Email verification routes -'verification.resend', 'verification.code.verify', 'verification.code', 'verification.verify' -``` +## Credits -## Testing +- [Galymzhan Begimov](https://github.com/begimov) +- [All Contributors](contributing.md) -You can run the tests with: +## License -```bash -composer test -``` \ No newline at end of file +[MIT](http://opensource.org/licenses/MIT)