Simple Authentication

URIMETHOD
/api/registerPOST
/api/loginPOST
/api/logoutGET

Test with Postman

You can import the postman collection and import the postman environment

Just replace the {{base_url}} variable for your app url, you can send requests with json data to test all endpoints.

Register

Fields required to register a user:

{
  "name": "John Doe",
  "email": "john@doe.com",
  "password": "YourPassword",
  "password_confirmation": "YourPassword"
}

Login

Fields required to login a user:

{
  "email": "john@doe.com",
  "password": "YourPassword"
}

Logout

The logout request only needs the token.

Customize the basic authentication process

VALIDATIONCONTROLLER
app/Http/Requests/JsonApiAuth/RegisterRequest.phpapp/Http/Controllers/JsonApiAuth/RegisterController.php
app/Http/Requests/JsonApiAuth/LoginRequest.phpapp/Http/Controllers/JsonApiAuth/LoginController.php
no have requestapp/Http/Controllers/JsonApiAuth/LogoutController.php