Skip to content

Commit e0b0d01

Browse files
authored
Build Server Project (Part 2) (#4)
* Build Server Project (Part 2) * TokenService Implementation * Login Flow & Code Improvements * Folder Classification
1 parent 3e55431 commit e0b0d01

File tree

152 files changed

+2674
-753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+2674
-753
lines changed

UltimateAuth.slnx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<File Path="Readme.md" />
44
<File Path="Roadmap.md" />
55
</Folder>
6-
<Project Path="src/CodeBeam.UltimateAuth.AspNetCore/CodeBeam.UltimateAuth.AspNetCore.csproj" Id="30d5db36-6dc8-46f6-9139-8b6b3d6053d5" />
6+
<Project Path="src/CodeBeam.UltimateAuth.AspNetCore/CodeBeam.UltimateAuth.Server.Users.csproj" Id="30d5db36-6dc8-46f6-9139-8b6b3d6053d5" />
77
<Project Path="src/CodeBeam.UltimateAuth.Client/CodeBeam.UltimateAuth.Client.csproj" Id="eb60a3b7-ba9d-48c9-98ad-b28e879b23bf" />
88
<Project Path="src/CodeBeam.UltimateAuth.Core/CodeBeam.UltimateAuth.Core.csproj" />
99
<Project Path="src/CodeBeam.UltimateAuth.Server/CodeBeam.UltimateAuth.Server.csproj" Id="0a8cdd12-a8c4-4530-87e8-ae778c46322b" />
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
namespace CodeBeam.UltimateAuth.Server.Users
2+
{
3+
/// <summary>
4+
/// Administrative user management operations.
5+
/// </summary>
6+
public interface IUAuthUserManagementService<TUserId>
7+
{
8+
Task<UserDto<TUserId>> GetByIdAsync(
9+
TUserId userId,
10+
CancellationToken ct = default);
11+
12+
Task<IReadOnlyList<UserDto<TUserId>>> GetAllAsync(
13+
CancellationToken ct = default);
14+
15+
Task DisableAsync(
16+
TUserId userId,
17+
CancellationToken ct = default);
18+
19+
Task EnableAsync(
20+
TUserId userId,
21+
CancellationToken ct = default);
22+
23+
Task ResetPasswordAsync(
24+
TUserId userId,
25+
ResetPasswordRequest request,
26+
CancellationToken ct = default);
27+
}
28+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
namespace CodeBeam.UltimateAuth.Server.Users
2+
{
3+
/// <summary>
4+
/// User self-service operations (profile, password, MFA).
5+
/// </summary>
6+
public interface IUAuthUserProfileService<TUserId>
7+
{
8+
Task<UserProfileDto<TUserId>> GetCurrentAsync(
9+
CancellationToken ct = default);
10+
11+
Task UpdateProfileAsync(
12+
UpdateProfileRequest request,
13+
CancellationToken ct = default);
14+
15+
Task ChangePasswordAsync(
16+
ChangePasswordRequest request,
17+
CancellationToken ct = default);
18+
19+
Task ConfigureMfaAsync(
20+
ConfigureMfaRequest request,
21+
CancellationToken ct = default);
22+
}
23+
}

src/CodeBeam.UltimateAuth.AspNetCore/CodeBeam.UltimateAuth.AspNetCore.csproj renamed to src/CodeBeam.UltimateAuth.AspNetCore/CodeBeam.UltimateAuth.Server.Users.csproj

File renamed without changes.

src/CodeBeam.UltimateAuth.AspNetCore/Handlers/.gitkeep

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace CodeBeam.UltimateAuth.Server.Users
2+
{
3+
public sealed class AdminUserFilter
4+
{
5+
public bool? IsActive { get; init; }
6+
public bool? IsEmailConfirmed { get; init; }
7+
8+
public string? Search { get; init; }
9+
}
10+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace CodeBeam.UltimateAuth.Server.Users
2+
{
3+
public sealed class ChangePasswordRequest
4+
{
5+
public required string CurrentPassword { get; init; }
6+
public required string NewPassword { get; init; }
7+
8+
/// <summary>
9+
/// If true, other sessions will be revoked.
10+
/// </summary>
11+
public bool RevokeOtherSessions { get; init; } = true;
12+
}
13+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace CodeBeam.UltimateAuth.Server.Users
2+
{
3+
public sealed class ConfigureMfaRequest
4+
{
5+
public bool Enable { get; init; }
6+
7+
/// <summary>
8+
/// Optional verification code when enabling MFA.
9+
/// </summary>
10+
public string? VerificationCode { get; init; }
11+
}
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace CodeBeam.UltimateAuth.Server.Users
2+
{
3+
public sealed class ResetPasswordRequest
4+
{
5+
public required string NewPassword { get; init; }
6+
7+
/// <summary>
8+
/// If true, all active sessions will be revoked.
9+
/// </summary>
10+
public bool RevokeSessions { get; init; } = true;
11+
}
12+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace CodeBeam.UltimateAuth.Server.Users
2+
{
3+
public sealed class UpdateProfileRequest
4+
{
5+
public string? Username { get; init; }
6+
public string? Email { get; init; }
7+
}
8+
}

0 commit comments

Comments
 (0)