llllllll-l / TripMDB

A fun way for movie nerds to find their next trip
2 stars 0 forks source link

Implement sign in & registration functionality C# .NET #12

Closed llllllll-l closed 5 months ago

llllllll-l commented 5 months ago

Sign in & registration

Backend

Using the JWT library from prev assignments, implement the registration & sign in (user) functionality.

Changes you have to make in the DB is adding a new 'usres' table with following columns:

UserName: string, NormalizedUserName: string, Email: string, NormalizedEmail: string, Password: string Role: string

Endpoints to be used are /sign-in and /register to sign in an already existing user and to register a new user respectively.

Data to be sent during /register is:

UserName: string, Email: string, Password: string Role: string<- default set to user

Data to be sent during /sign-in is:

UserName: string Email: string Password: string

Expected return for /register:

{ status: success, user { UserName: stirng Email: string }}

Expected return for /sign-in:

status: success, user { UserName: string, Email: string }}