-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from TomasSirotek/development
🔥 Deploy
- Loading branch information
Showing
317 changed files
with
15,783 additions
and
8,080 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,49 @@ | ||
<!-- For more info on central package management go to https://devblogs.microsoft.com/nuget/introducing-central-package-management/ --> | ||
<Project> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Ardalis.GuardClauses" Version="4.2.0" /> | ||
<PackageVersion Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" /> | ||
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.3.0" /> | ||
<PackageVersion Include="Azure.Identity" Version="1.10.4" /> | ||
<PackageVersion Include="coverlet.collector" Version="6.0.0" /> | ||
<PackageVersion Include="coverlet.msbuild" Version="6.0.0" /> | ||
<PackageVersion Include="FluentAssertions" Version="6.12.0" /> | ||
<PackageVersion Include="FluentValidation.AspNetCore" Version="11.3.0" /> | ||
<PackageVersion Include="FluentValidation.DependencyInjectionExtensions" Version="11.8.0" /> | ||
<PackageVersion Include="MediatR" Version="12.1.1" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> | ||
<PackageVersion Include="Moq" Version="4.20.69" /> | ||
<PackageVersion Include="NSwag.AspNetCore" Version="14.0.0-preview009" /> | ||
<PackageVersion Include="NSwag.MSBuild" Version="14.0.0-preview009" /> | ||
<PackageVersion Include="nunit" Version="3.14.0" /> | ||
<PackageVersion Include="NUnit.Analyzers" Version="3.9.0" /> | ||
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" /> | ||
<PackageVersion Include="Respawn" Version="6.1.0" /> | ||
<PackageVersion Include="Testcontainers.MsSql" Version="3.6.0" /> | ||
<PackageVersion Include="ZymLabs.NSwag.FluentValidation.AspNetCore" Version="0.6.2" /> | ||
<PackageVersion Include="Microsoft.Playwright" Version="1.39.0" /> | ||
<PackageVersion Include="SpecFlow.Plus.LivingDocPlugin" Version="3.9.57" /> | ||
<PackageVersion Include="SpecFlow.NUnit" Version="3.9.74" /> | ||
</ItemGroup> | ||
<!-- For more info on central package management go to https://devblogs.microsoft.com/nuget/introducing-central-package-management/ --> | ||
<Project> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageVersion Include="Ardalis.GuardClauses" Version="4.2.0" /> | ||
<PackageVersion Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" /> | ||
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.3.0" /> | ||
<PackageVersion Include="Azure.Identity" Version="1.10.4" /> | ||
<PackageVersion Include="Azure.Security.KeyVault.Secrets" Version="4.6.0-beta.2" /> | ||
<PackageVersion Include="coverlet.collector" Version="6.0.0" /> | ||
<PackageVersion Include="coverlet.msbuild" Version="6.0.0" /> | ||
<PackageVersion Include="FluentAssertions" Version="6.12.0" /> | ||
<PackageVersion Include="FluentValidation.AspNetCore" Version="11.3.0" /> | ||
<PackageVersion Include="FluentValidation.DependencyInjectionExtensions" Version="11.8.0" /> | ||
<PackageVersion Include="MediatR" Version="12.1.1" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> | ||
<PackageVersion Include="Moq" Version="4.20.69" /> | ||
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" /> | ||
<PackageVersion Include="NSwag.AspNetCore" Version="14.0.0-preview009" /> | ||
<PackageVersion Include="NSwag.MSBuild" Version="14.0.0-preview009" /> | ||
<PackageVersion Include="nunit" Version="3.14.0" /> | ||
<PackageVersion Include="NUnit.Analyzers" Version="3.9.0" /> | ||
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" /> | ||
<PackageVersion Include="Respawn" Version="6.1.0" /> | ||
<PackageVersion Include="Stripe.net" Version="43.5.0" /> | ||
<PackageVersion Include="Testcontainers.MsSql" Version="3.6.0" /> | ||
<PackageVersion Include="ZymLabs.NSwag.FluentValidation.AspNetCore" Version="0.6.2" /> | ||
<PackageVersion Include="Microsoft.Playwright" Version="1.39.0" /> | ||
<PackageVersion Include="SpecFlow.Plus.LivingDocPlugin" Version="3.9.57" /> | ||
<PackageVersion Include="SpecFlow.NUnit" Version="3.9.74" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System.Diagnostics; | ||
using SkillSphere.Application.Common.Interfaces; | ||
using SkillSphere.Application.Common.Models; | ||
|
||
namespace SkillSphere.Application.Auth.Commands; | ||
|
||
public record AuthUserCommand : IRequest<AuthResult> | ||
{ | ||
public string? Email { get; init; } | ||
public string? Password { get; init; } | ||
} | ||
|
||
public class AuthenticateCommandHandler : IRequestHandler<AuthUserCommand,AuthResult> | ||
{ | ||
private readonly IIdentityService _userService; | ||
|
||
public AuthenticateCommandHandler(IIdentityService userService) | ||
{ | ||
_userService = userService; | ||
} | ||
public async Task<AuthResult> Handle(AuthUserCommand request, CancellationToken cancellationToken) | ||
{ | ||
Guard.Against.NullOrEmpty(request.Email, nameof(request.Email)); | ||
Guard.Against.NullOrEmpty(request.Password, nameof(request.Password)); | ||
|
||
return await _userService.AuthenticateAsync(request.Email, request.Password); | ||
} | ||
|
||
|
||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System.Diagnostics; | ||
using SkillSphere.Application.Common.Interfaces; | ||
using SkillSphere.Application.Common.Models; | ||
|
||
namespace SkillSphere.Application.Auth.Commands; | ||
|
||
public record RegisterUserCommand : IRequest<Result> | ||
{ | ||
public string? Email { get; init; } | ||
public string? Password { get; init; } | ||
} | ||
|
||
public class RegisterUserCommandHandler : IRequestHandler<RegisterUserCommand,Result> | ||
{ | ||
private readonly IIdentityService _userService; | ||
|
||
public RegisterUserCommandHandler(IIdentityService userService) | ||
{ | ||
_userService = userService; | ||
} | ||
public async Task<Result> Handle(RegisterUserCommand request, CancellationToken cancellationToken) | ||
{ | ||
Guard.Against.NullOrEmpty(request.Email, nameof(request.Email)); | ||
Guard.Against.NullOrEmpty(request.Password, nameof(request.Password)); | ||
|
||
return await _userService.CreateUserAsync(request.Email, request.Password); | ||
} | ||
|
||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.