All Projects → rluders → Oc Jwtauth Plugin

rluders / Oc Jwtauth Plugin

Licence: gpl-3.0
JWTAuth Plugin for OctoberCMS.

Projects that are alternatives of or similar to Oc Jwtauth Plugin

Nest Angular
NestJS, Angular 6, Server Side Rendering (Angular Universal), GraphQL, JWT (JSON Web Tokens) and Facebook/Twitter/Google Authentication, Mongoose, MongoDB, Webpack, TypeScript
Stars: ✭ 307 (+3737.5%)
Mutual labels:  jwt, jwt-authentication
F License
Open Source License Key Generation and Verification Tool written in Go
Stars: ✭ 535 (+6587.5%)
Mutual labels:  jwt, jwt-authentication
Jwt Auth Guard
JWT Auth Guard for Laravel and Lumen Frameworks.
Stars: ✭ 319 (+3887.5%)
Mutual labels:  jwt, jwt-authentication
fiber-boilerplate
This is the go boilerplate on the top of fiber web framework. With simple setup you can use many features out of the box
Stars: ✭ 184 (+2200%)
Mutual labels:  jwt, jwt-authentication
Simplemall
基于SpringCloud的微服务架构实战案例项目,以一个简单的购物流程为示例,融合spring cloud 相关组件,如spring-cloud-netflix、swagger等
Stars: ✭ 687 (+8487.5%)
Mutual labels:  jwt, jwt-authentication
Jwt Spring Security Demo
This is a demo for using JWT (JSON Web Token) with Spring Security and Spring Boot. I completely rewrote my first version. Now this solution is based on the code base from the JHipster Project. I tried to extract the minimal configuration and classes that are needed for JWT-Authentication and did some changes.
Stars: ✭ 2,843 (+35437.5%)
Mutual labels:  jwt, jwt-authentication
Jwt
Go JWT signing, verifying and validating
Stars: ✭ 394 (+4825%)
Mutual labels:  jwt, jwt-authentication
Php Jwt
Ultra lightweight, dependency free and standalone JSON web token (JWT) library for PHP5.6 to PHP8.0. This library makes JWT a cheese.
Stars: ✭ 214 (+2575%)
Mutual labels:  jwt, jwt-authentication
Naperg
Fullstack Boilerplate GraphQL. Made with React & Prisma + authentication & roles
Stars: ✭ 661 (+8162.5%)
Mutual labels:  jwt, jwt-authentication
Node Express Mongodb Jwt Rest Api Skeleton
This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API). Demo of frontend in VueJS here: https://github.com/davellanedam/vue-skeleton-mvp
Stars: ✭ 603 (+7437.5%)
Mutual labels:  jwt, jwt-authentication
react-redux-jwt-authentication-boilerplate
React-Redux JWT Authentication Boilerplate
Stars: ✭ 44 (+450%)
Mutual labels:  jwt, jwt-authentication
Go Book Store Api
Go Sample project to understand Mysql CRUD operation with best practises Includes logging, JWT, Swagger and Transactions
Stars: ✭ 18 (+125%)
Mutual labels:  jwt, jwt-authentication
munhasir
Sample RESTful single page web app with Go, MongoDB and VueJS. A platform for keeping diaries for those who are cautious(or paranoid).
Stars: ✭ 24 (+200%)
Mutual labels:  jwt, jwt-authentication
Aspnetcoreapistarter
An ASP.NET Core (v2.1) Web API project to quickly bootstrap new projects. Includes Identity, JWT authentication w/ refresh tokens.
Stars: ✭ 304 (+3700%)
Mutual labels:  jwt, jwt-authentication
Laravel Jwt
Dead simple, plug and play JWT API Authentication for Laravel (5.4+)
Stars: ✭ 225 (+2712.5%)
Mutual labels:  jwt, jwt-authentication
Aspnetcore Webapi Course
Professional REST API design with ASP.NET Core 3.1 WebAPI
Stars: ✭ 323 (+3937.5%)
Mutual labels:  jwt, jwt-authentication
Spring Webflux Security Jwt
A JWT authorization and authentication implementation with Spring Reactive Webflux, Spring Boot 2 and Spring Security 5
Stars: ✭ 190 (+2275%)
Mutual labels:  jwt, jwt-authentication
Jwt Spring Security Jpa
Backend MVP showcasing JWT (Json Web Token) authentication with multiple login, timeout / refresh / logout (with in memory invalidation) using Spring Security & MySQL JPA.
Stars: ✭ 202 (+2425%)
Mutual labels:  jwt, jwt-authentication
Springboot Jwt Starter
A Spring Boot JWT starter kit for stateless and token-based authentication apps.
Stars: ✭ 538 (+6625%)
Mutual labels:  jwt, jwt-authentication
Jose Jwt
Ultimate Javascript Object Signing and Encryption (JOSE) and JSON Web Token (JWT) Implementation for .NET and .NET Core
Stars: ✭ 692 (+8550%)
Mutual labels:  jwt, jwt-authentication

Known Vulnerabilities

Introduction

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

Tutorials

Installation

Yes, you can install it from the repository (but I'll not provide a documentation for that - in this case I'll assume that you know what you are doing). I strongly recommend that you install it from product page inside the OctoberCMS Marketplace.

Configuration

You must set a secret token for your application. Do do it, on October's Backend access: Settings > Users > JWTAuth

Usage

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

If you are using Postman, you can click here to import the collection with all the calls that you need to test it.

Login

POST /api/auth/login

Route name

api.auth.login

Parameters

Name Type Required Description
login string Yes Account login attribute
password string Yes Account password

The field login value can be the account email or username. You can select it on RainLab.User configuration what field should be used for login.

Responses

SUCCESS

Code: 200

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

ERROR

Code: 401

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

Register

POST /api/auth/register

Route name

api.auth.register

Parameters

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

The field username can be required. It depends of your RainLab.User configuration.

Responses

SUCCESS

Code: 201

[]

ERROR

Code: 401

{
  error: (object|registration_disabled)
}

Supported events

  • rainlab.user.beforeRegister
  • rainlab.user.register

Account Activation

POST /api/auth/account-activation

Route name

api.auth.account-activation

Parameters

Name Type Required Description
activation_code string Yes Account activation code

Responses

SUCCESS

Code: 200

[]

ERROR

Code: 422

{
  error: (invalid_activation_code|invalid_user|user_not_found)
}

Forgot Password

POST /api/auth/forgot-password

Route name

api.auth.forgot-password

Parameters

Name Type Required Description
email string Yes Account email

Responses

SUCCESS

Code: 200

[]

ERROR

Code: 404

{
  error: (user_not_found)
}

Reset Password

POST /api/auth/reset-password

Route name

api.auth.reset-password

Parameters

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

Responses

SUCCESS

Code: 200

[]

ERROR

Code: 422

{
  error: (invalid_reset_password_code|invalid_user|invalid_reset_password_code)
}

Refresh Token

POST /api/auth/refresh-token

Route name

auth.api.refresh-token

Parameters

Name Type Required Description
token string Yes Valid user JWToken

Responses

SUCCESS

Code: 200

{
  token: (string)
}

ERROR

Code: 403

{
  error: (could_not_refresh_token|given_token_was_blacklisted)
}

Get User

GET /api/auth/me

Middleware

jwt.auth

Route name

api.auth.me

Parameters

Name Type Required Description
token string Yes Valid token

Responses

SUCCESS

Code: 200

{
  user: (object)
}

ERROR

Code: 404

{
  error: (user_not_found)
}

Known issues

Beside the fact that I'm always trying to solve the possible issues, bad things could happen. Here, an list of possible issues and how to fix it.

Note to Apache users

In order to use the authorization Bearer Token you must add the following code to your .httaccess

RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

License

GPLv3

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].