#29

Product support

Get help in the plugin support forum.

Categories

  • Miscellaneous
  • Security
  • Utility

This plugin provides a JSON Web Tokens authentication mechanism for OctoberCMS integrated with RainLab.User. It's essential for your web application built with Angular, Vue.js, React or other modern Javascript frameworks.

Requirements

Theme

Configuration

You can change the security token by accessing: Settings > Users > JWTAuth Configuration

Usage

Here's the list of available endpoints for this plugin.

Login

POST /api/auth/login

Parameters

Name Type Required Description
email string Yes Account email
password string Yes Account password

Responses:

SUCCESS
Code: 200
Content:

{
  token: (string),
  user: (object)
}

ERROR
Code: 401
Content:

{
  error: (object|invalid_credentials|could_not_create_token|user_inactive)
}

Register

POST /api/auth/register

Parameters

Name Type Required Description
username string Yes Account username
email string Yes Account email
password string Yes Account password
password_confirmation string No Confirm the new password

Responses:

SUCCESS
Code: 200
Content: null

ERROR
Code: 400
Content:

{
  error: (object)
}

Forgot Password

POST /api/auth/forgot_password

Parameters

Name Type Required Description
email string Yes Account email

Responses

SUCCESS
Code: 200
Content: null

ERROR
Code: 400 Content:

{
  error: (object|user_not_found)
}

Reset Password

POST /api/auth/reset_password

Parameters

Name Type Required Description
code string Yes Reset password code
password string Yes Account new password
password_confirmation string No Confirm the new password

Responses

SUCCESS
Code: 200
Content: null

ERROR
Code: 400 Content:

{
  error: (object|invalid_reset_password_code|invalid_user)
}

Account Activation

POST /api/auth/account_activation

Parameters

Name Type Required Description
activation_code string Yes Account activation code

Responses

SUCCESS
Code: 200
Content: null

ERROR
Code: 400
Content:

{
  error: (object|invalid_activation_code|invalid_user)
}
1.1.0

Settings support added

Mar 07, 2017

1.0.1

First version of JWTAuth

Feb 28, 2017