-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from reddimohan/dev
Dev
- Loading branch information
Showing
5 changed files
with
184 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Reddi Mohan A | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,168 @@ | ||
# api | ||
[![Contributors][contributors-shield]][contributors-url] | ||
[![Forks][forks-shield]][forks-url] | ||
[![Stargazers][stars-shield]][stars-url] | ||
[![Issues][issues-shield]][issues-url] | ||
[![MIT License][license-shield]][license-url] | ||
[![LinkedIn][linkedin-shield]][linkedin-url] | ||
|
||
git clone | ||
|
||
|
||
<!-- PROJECT LOGO --> | ||
<br /> | ||
<p align="center"> | ||
<a href="https://github.com/reddimohan/loopback4-authentication-jwt-roles"> | ||
</a> | ||
|
||
<h3 align="center">Loopback 4 JWT Authentication with Roles</h3> | ||
|
||
<p align="center"> | ||
Loopback 4 Boilerplate code for quick implimentation of Authentication and Roles based on JWT. | ||
<br /> | ||
<br /> | ||
<a href="https://github.com/reddimohan/loopback4-authentication-jwt-roles">View Demo</a> | ||
· | ||
<a href="https://github.com/reddimohan/loopback4-authentication-jwt-roles/issues">Report Bug</a> | ||
</p> | ||
</p> | ||
|
||
|
||
|
||
<!-- TABLE OF CONTENTS --> | ||
## Table of Contents | ||
|
||
* [About the Project](#about-the-project) | ||
* [Built With](#built-with) | ||
* [Getting Started](#getting-started) | ||
* [Prerequisites](#prerequisites) | ||
* [Installation](#installation) | ||
* [Roadmap](#roadmap) | ||
* [Contributing](#contributing) | ||
* [License](#license) | ||
* [Contact](#contact) | ||
|
||
|
||
|
||
<!-- ABOUT THE PROJECT --> | ||
## About The Project | ||
|
||
[![https://reddimohan.github.io][product-screenshot-1]]() | ||
### API Docs | ||
[![https://reddimohan.github.io][product-screenshot-2]]() | ||
|
||
### Built With | ||
|
||
* [Loopback 4](https://loopback.io/doc/en/lb4) | ||
* [MySQL](https://www.mysql.com) | ||
* [jwt](https://jwt.io) | ||
|
||
|
||
|
||
<!-- GETTING STARTED --> | ||
## Getting Started | ||
|
||
To get a local copy up and running follow these simple steps. | ||
|
||
### Prerequisites | ||
|
||
This is an example of how to list things you need to use the software and how to install them. | ||
* node.js, npm | ||
|
||
```sh | ||
npm install npm@latest -g | ||
``` | ||
|
||
### Installation | ||
|
||
1. Clone the repo | ||
```sh | ||
git clone https://github.com/reddimohan/loopback4-authentication-jwt-roles.git | ||
``` | ||
2. Install NPM packages | ||
```sh | ||
npm install | ||
update db details in src/datasources/mysql.datasource.config.json | ||
``` | ||
3. Create a database (MySQL) | ||
4. Update database details in src/datasources/mysql.datasource.config.json file | ||
```sh | ||
{ | ||
"name": "mysql", | ||
"connector": "mysql", | ||
"url": "", | ||
"host": "localhost", | ||
"port": 3306, | ||
"user": "<username>", | ||
"password": "<password>", | ||
"database": "<db_name>" | ||
} | ||
``` | ||
5. Migrade database schema | ||
```sh | ||
npm run build | ||
num run migrate | ||
``` | ||
6. Start the application | ||
```sh | ||
npm start | ||
``` | ||
7. Install Loopback 4 CLI - This will be useful when you want to start developing on top this repo | ||
```sh | ||
npm install -g @loopback/cli | ||
``` | ||
|
||
|
||
<!-- ROADMAP --> | ||
## Roadmap | ||
|
||
See the [open issues](https://github.com/reddimohan/loopback4-authentication-jwt-roles/issues) for a list of proposed features (and known issues). | ||
|
||
|
||
|
||
<!-- CONTRIBUTING --> | ||
## Contributing | ||
|
||
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**. | ||
|
||
1. Fork the Project | ||
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) | ||
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) | ||
4. Push to the Branch (`git push origin feature/AmazingFeature`) | ||
5. Open a Pull Request | ||
|
||
|
||
|
||
<!-- LICENSE --> | ||
## License | ||
|
||
Distributed under the MIT License. See `LICENSE` for more information. | ||
|
||
|
||
|
||
<!-- CONTACT --> | ||
## Contact | ||
|
||
Mohan - [LinkedIn](https://linkedin.com/in/reddimohan) - [Twitter](https://twitter.com/reddimohan) | ||
|
||
Project Link: [https://github.com/reddimohan/loopback4-authentication-jwt-roles](https://github.com/reddimohan/loopback4-authentication-jwt-roles) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
[![LoopBack](https://github.com/strongloop/loopback-next/raw/master/docs/site/imgs/branding/Powered-by-LoopBack-Badge-(blue)-@2x.png)](http://loopback.io/) | ||
# loopback4-authentication-jwt-roles | ||
<!-- MARKDOWN LINKS & IMAGES --> | ||
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --> | ||
[contributors-shield]: https://img.shields.io/github/contributors/reddimohan/loopback4-authentication-jwt-roles.svg?style=flat-square | ||
[contributors-url]: https://github.com/reddimohan/loopback4-authentication-jwt-roles/graphs/contributors | ||
[forks-shield]: https://img.shields.io/github/forks/reddimohan/loopback4-authentication-jwt-roles.svg?style=flat-square | ||
[forks-url]: https://github.com/reddimohan/loopback4-authentication-jwt-roles/network/members | ||
[stars-shield]: https://img.shields.io/github/stars/reddimohan/loopback4-authentication-jwt-roles.svg?style=flat-square | ||
[stars-url]: https://github.com/reddimohan/loopback4-authentication-jwt-roles/stargazers | ||
[issues-shield]: https://img.shields.io/github/issues/reddimohan/loopback4-authentication-jwt-roles.svg?style=flat-square | ||
[issues-url]: https://github.com/reddimohan/loopback4-authentication-jwt-roles/issues | ||
[license-shield]: https://img.shields.io/github/license/reddimohan/loopback4-authentication-jwt-roles.svg?style=flat-square | ||
[license-url]: https://github.com/reddimohan/loopback4-authentication-jwt-roles/blob/master/LICENSE | ||
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555 | ||
[linkedin-url]: https://linkedin.com/in/reddimohan | ||
[product-screenshot-1]: images/home.png | ||
[product-screenshot-2]: images/api_docs.png |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters