REST-API for managing Kwetter users.
Techstack:
- .NET CORE 3.1
- MSSQL-database
docker-compose up --build
dotnet run --launch-profile kwetter_authentication
The .NET CORE Docker build contains a SonarScanner (see ./Dockerfile.sonar
). This is why SonarQube needs to be started.
Checkout this SonarQube snippet I made with a full explanation.
#zsh
docker run -d --name sonarqube --memory=5g -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:latest
#zsh
docker build -f Dockerfile.sonar kwetter-auth \
--build-arg SONAR_PROJECT_KEY="auth" \
--build-arg SONAR_HOST_URL="http://localhost:9000" \
--build-arg SONAR_TOKEN="${TOKEN}" --network=host .
Endpoint | Method | Endpoint | Permission |
---|---|---|---|
Authorize |
POST |
/authorize |
User |
Get All |
GET |
/users |
User |
Create |
POST |
/users/create |
None |
Get |
GET |
/users/{id} |
User |
Update |
PUT |
/users/{id} |
User |
Delete |
DELETE |
/users/delete/{id} |
Moderator, Admin |
Update Role |
PUT |
/roles/update/{id} |
Admin |
If the directory /Migrations
doesn't exist or doesn't container .cs
, .Designer.cs
, and a Snapshot.cs
run the following to create these files.
#zsh
dotnet ef migrations add Initial --project src/kwetter-authentication.csproj