Skip to content

Commit

Permalink
Closes #16
Browse files Browse the repository at this point in the history
Renamed backend database to ksummarized. Changed the db context to application.
  • Loading branch information
Sojusan committed Feb 23, 2024
1 parent 4949cbb commit 5ac8172
Show file tree
Hide file tree
Showing 22 changed files with 77 additions and 1,175 deletions.
2 changes: 1 addition & 1 deletion backend/src/api/Controllers/AuthenticationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task<IActionResult> CreateUser()
}

var (isSuccess, error) = await _userService.CreateKeycloakUser(
new UserDto
new UserDTO
{
KeycloakUuid = keycloakUuid,
Email = userEmail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace api.Data;

public class UsersDbContext : DbContext
public class ApplicationDbContext : DbContext
{
public UsersDbContext(DbContextOptions<UsersDbContext> options) : base(options)
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options)
{
}
public DbSet<UserModel> Users { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion backend/src/api/Data/DTO/UserDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace api.Data.DTO;

public class UserDto
public class UserDTO
{
[Required]
public required string KeycloakUuid { get; set; }
Expand Down
18 changes: 14 additions & 4 deletions backend/src/api/Data/KeycloakJwtOptions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
namespace api.Data;
using System.Diagnostics.CodeAnalysis;

namespace api.Data;
public class KeycloakJwtOptions
{
public string? Issuer { get; set; }
public string? Audience { get; set; }
public string? Secret { get; set; }
public required string Issuer { get; set; }
public required string Audience { get; set; }
public required string Secret { get; set; }

[SetsRequiredMembers]
public KeycloakJwtOptions(string issuer, string audience, string secret)
{
Issuer = issuer;
Audience = audience;
Secret = secret;
}
}

This file was deleted.

Loading

0 comments on commit 5ac8172

Please sign in to comment.