Skip to content

ASP.NET Core Web Api that handles simple JWT Token Auth, and an endpoint that consumes external weather data map it and return to client app.

Notifications You must be signed in to change notification settings

stefankrstevski/WeatherWebApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

WeatherWebApi

This project is a RESTful API developed with ASP.NET Core Web API, designed to serve an Angular SPA for displaying weather information. It features user authentication and authorization with JWT bearer tokens, data persistence in MySQL, and integrates with the OpenWeatherMap API.

Getting Started

Prerequisites

Installation

You'll just need to clone the repo, update appsettings with your settings and connection string. Build and run. One tricky part is that you should register on openweatherapi to get your apikey.

Endpoints

POST /api/auth/register: Registers a new user. POST /api/auth/login: Authenticates a user and returns a JWT. GET /api/weather/week-summary: Retrieves weather information. Requires authentication.

Security

This project uses ASP.NET Core Identity for user management and role-based authorization. Passwords are hashed and stored securely. JWT tokens are used for authentication.

Deployment

Instructions for deploying to IIS. It is pretty simple I've followed this youtube video.

Angular SPA link.

About

ASP.NET Core Web Api that handles simple JWT Token Auth, and an endpoint that consumes external weather data map it and return to client app.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages