I have added folder 'postman' into the project. There you can find postman configs for Postman to test API.
I have added 3 Controllers
- AuthController - For custom authorisation.
- PingPongController - For Ping-Pong task
- BookController - For books-API
I have added 2 Providers
- TokenServiceProvider - it provide 2 variants of token Services (bearer and jwt)
- BookStoreServiceProvider - It provide Service for working with json-file with books
I have added 2 Services
- Token (with 2 implementations Bearer and JWT)
- BookStore
I have added 2 Facades for Services
- BookStoreService
- TokenService
I have added custom UserProvider to customize behavior of Auth::provider. Look in app/Providers/AuthServiceProvider::boot() and config/auth.php::providers
I have added 2 middleware
- CustomAuth - to check is user logged in
- ExecutionTime- to add request execution time header
I have added 2 config files
- books.php - for BookStoreService
- token.php - for TokenService