Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yesarib/movieapp-token-cache-redis
🌱 This project is an example of an API developed with .NET Core and includes JWT token authentication, caching and Redis integration. Designed as a mini MovieApp, the project demonstrates these features.
https://github.com/yesarib/movieapp-token-cache-redis
api api-rest cache caching jwt jwt-auth jwt-token netcore oauth2 redis token
Last synced: 2 days ago
JSON representation
🌱 This project is an example of an API developed with .NET Core and includes JWT token authentication, caching and Redis integration. Designed as a mini MovieApp, the project demonstrates these features.
- Host: GitHub
- URL: https://github.com/yesarib/movieapp-token-cache-redis
- Owner: Yesarib
- Created: 2023-11-15T22:08:38.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-01-09T19:51:03.000Z (about 1 year ago)
- Last Synced: 2024-11-10T20:09:23.072Z (2 months ago)
- Topics: api, api-rest, cache, caching, jwt, jwt-auth, jwt-token, netcore, oauth2, redis, token
- Language: C#
- Homepage:
- Size: 42 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MovieApp Token Cache Redis
This is a sample API project developed with .NET Core, featuring JWT token authentication, caching, and Redis integration. The project serves as a mini MovieApp to showcase these functionalities.
### Features
1. JWT Token Authentication: Secure your API with JSON Web Token (JWT) authentication.
2. Caching: Implement caching to enhance performance by storing frequently accessed data in-memory.
3. Redis Integration: Utilize Redis as a distributed caching solution to enhance scalability and reduce load on the primary database.### Setup
1. Clone The Repository
2. Configure Database:
Ensure that SqlServer is running and accessible. Update the SQL connection details in the appsettings.json file:
```` "SqlServer" :"your sql server connection string" ````
4. Configure Redis:
Ensure that Redis is running and accessible. Update the Redis connection details in the appsettings.json file:
``` "CacheOptions": {"Url": "yoururl:port" }```### Usage
1. Obtain JWT Token:
Authenticate and obtain a JWT token by making a POST request to /api/auth/createtoken with valid credentials.
2. Access Movie Data:
Use the obtained JWT token to access movie data by including it in the Authorization header of your requests:
```
GET /api/movies
Authorization: Bearer your-jwt-token
```
3. Access Movie Data With Redis:
Use the obtained JWT token to access movie data by including it in the Authorization header of your requests:
```
GET /api/getMoviesFromRedis
Authorization: Bearer your-jwt-token
```