Skip to content
Michele Angioni edited this page Mar 8, 2016 · 1 revision

To enable the authentication endpoints, set the authentication key to true in the ma_messageboard.php config file.

User Authentication

Endpoint

POST /api/v1/auth

Data Receivable

'email' => 'required|email',
'password' => 'required|max:128'

Data Returned

'token'

The user email and password field will be used to retrieve and validate the user. A valid token will be returned.

Logout

Endpoint

DELETE /api/v1/auth

Authentication Header

Required

The token gets invalidated.

Refresh Token

Endpoint

POST /api/v1/auth-refresh

Authentication Header

Required

Data Returned

'token'

The old token gets invalidated and, if it is still refreshable, a new token is returned.

N.B. The /api prefix in the urls can be customized by changing the api_prefix key to true in the ma_messageboard.php config file.