Skip to content

Commit 848fae1

Browse files
authored
DX Improvization (#24)
* Added Authentication EFCore Store * Completed Routes Improvization * Added InMemory & EFCore NuGet-Aimed Projects * Changed InMemory Stores With Tenant-Aware Factory Pattern * EFCore User Plugin Domain Store Tests * Added EFCore Session Store Tests * Added Authentication & Authorization EFCore Tests * Core to Server Project's NuGet Package Arrangement * Seperate Client to a new CodeBeam.UltimateAuth.Client.Blazor Package & ResourceApi Pipeline Skeleton * Completed NuGet Package Preparation * Directory.Build.props Addition * Automatized NuGet Pack Arrangements * Completed DX Fundamentals & First Quick Start and Examples in Readme.md
1 parent abe186e commit 848fae1

440 files changed

Lines changed: 7885 additions & 1603 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ PublishScripts/
194194

195195
# NuGet Packages
196196
*.nupkg
197+
nupkgs/
197198
# NuGet Symbol Packages
198199
*.snupkg
199200
# The packages folder can be ignored because of Package Restore

.ultimateauth/pack.bat.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@echo off
2+
3+
echo ==============================
4+
echo Packing UltimateAuth packages
5+
echo ==============================
6+
7+
REM eski paketleri temizle
8+
if exist nupkgs (
9+
echo Cleaning old packages...
10+
rmdir /s /q nupkgs
11+
)
12+
13+
REM pack işlemi
14+
echo Running dotnet pack...
15+
dotnet pack -c Release -o ./nupkgs
16+
17+
REM sonuç kontrol
18+
if %errorlevel% neq 0 (
19+
echo ❌ Pack failed!
20+
pause
21+
exit /b %errorlevel%
22+
)
23+
24+
echo ✅ Pack completed successfully!
25+
echo Packages are in /nupkgs
26+
27+
pause

.ultimateauth/package.bat

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@echo off
2+
3+
echo ==============================
4+
echo Packing UltimateAuth packages
5+
echo ==============================
6+
7+
REM eski paketleri temizle
8+
if exist nupkgs (
9+
echo Cleaning old packages...
10+
rmdir /s /q nupkgs
11+
)
12+
13+
REM pack işlemi
14+
echo Running dotnet pack...
15+
dotnet pack -c Release -o ./nupkgs
16+
17+
REM sonuç kontrol
18+
if %errorlevel% neq 0 (
19+
echo ❌ Pack failed!
20+
pause
21+
exit /b %errorlevel%
22+
)
23+
24+
echo ✅ Pack completed successfully!
25+
echo Packages are in /nupkgs
26+
27+
pause

Directory.Build.props

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project>
2+
<PropertyGroup>
3+
<Version>0.1.0-preview.1</Version>
4+
<NoWarn>$(NoWarn);1591</NoWarn>
5+
6+
<Authors>CodeBeam</Authors>
7+
<Company>CodeBeam</Company>
8+
9+
<RepositoryUrl>https://github.com/CodeBeamOrg/UltimateAuth</RepositoryUrl>
10+
<PackageProjectUrl>https://github.com/CodeBeamOrg/UltimateAuth</PackageProjectUrl>
11+
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
12+
13+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
14+
<Nullable>enable</Nullable>
15+
<ImplicitUsings>enable</ImplicitUsings>
16+
17+
<IncludeSymbols>true</IncludeSymbols>
18+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
19+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
20+
</PropertyGroup>
21+
</Project>

README.md

Lines changed: 161 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ UltimateAuth is an open-source authentication framework that unifies secure sess
2525

2626
## 🌟 Why UltimateAuth: The Six-Point Principles
2727

28-
### **1) Developer-Centric**
28+
### **1) Developer-Centric & User-Friendly**
2929
Clean APIs, predictable behavior, minimal ceremony — designed to make authentication *pleasant* for developers.
3030

3131
### **2) Security-Driven**
@@ -38,40 +38,159 @@ No forced dependencies. No unnecessary weight.
3838
### **4) Plug-and-Play Ready**
3939
From setup to production, UltimateAuth prioritizes a frictionless integration journey with sensible defaults.
4040

41-
### **5) User-Friendly Flows**
42-
Authentication should be secure *and* intuitive.
43-
Consistent, predictable, and UX-friendly at every step.
44-
45-
### **6) Blazor & MAUI-Ready for Modern .NET**
41+
### **5) Blazor & MAUI-Ready for Modern .NET**
4642
Blazor WebApp, Blazor WASM, Blazor Server, and .NET MAUI expose weaknesses in traditional auth systems.
4743
UltimateAuth is engineered from day one to support real-world scenarios across the entire modern .NET UI stack.
4844

49-
---
50-
51-
## 🔑 What UltimateAuth Provides
45+
### **6) Unified Framework**
46+
One solution, same codebase across Blazor server, WASM and MAUI. UltimateAuth handles client differences internally and providing consistent and reliable public API.
5247

53-
- A **secure, modern session-based authentication core**
54-
(opaque SessionId, server-managed, real-time revocation, device tracking)
55-
56-
- A **unified architecture** bridging Session, PKCE, and OAuth-style auth flows
48+
---
5749

58-
- An **override-first design** suitable for enterprise extensions
50+
# 🚀 Quick Start
51+
52+
### 1) Install packages (Will be available soon)
53+
54+
1.1 Core Packages
55+
```bash
56+
dotnet add package CodeBeam.UltimateAuth.Server
57+
dotnet add package CodeBeam.UltimateAuth.Client.Blazor
58+
```
59+
1.2 Persistence & Reference Packages (Choose One)
60+
```bash
61+
dotnet add package CodeBeam.UltimateAuth.InMemory.Bundle (for debug & development)
62+
dotnet add package CodeBeam.UltimateAuth.EntityFrameworkCore.Bundle (for production)
63+
```
64+
### 2) Configure services (in program.cs)
65+
Server registration:
66+
```csharp
67+
builder.Services
68+
.AddUltimateAuthServer()
69+
.AddUltimateAuthEntityFrameworkCore(); // Production
70+
71+
// OR
72+
73+
builder.Services
74+
.AddUltimateAuthServer()
75+
.AddUltimateAuthInMemory(); // Development
76+
77+
```
78+
79+
Client registration:
80+
81+
```csharp
82+
builder.Services.AddUltimateAuthClientBlazor();
83+
```
84+
**Usage by application type:**
85+
86+
- **Blazor Server App** → Use both Server and Client registrations
87+
- **Blazor WASM / MAUI** → Use Client only
88+
- **Auth Server / Resource API** → Use Server only
89+
90+
### 3) Configure pipeline
91+
```csharp
92+
// app.UseHttpsRedirection();
93+
// app.UseStaticFiles();
94+
95+
app.UseUltimateAuthWithAspNetCore(); // Includes UseAuthentication() and UseAuthorization()
96+
// Place Antiforgery or something else needed
97+
app.MapUltimateAuthEndpoints();
98+
99+
app.MapRazorComponents<App>()
100+
.AddInteractiveServerRenderMode()
101+
.AddUltimateAuthRoutes(UAuthAssemblies.BlazorClient());
102+
```
103+
104+
### 4) Add UAuth Script
105+
Place this in `App.razor` or `index.html`
106+
```csharp
107+
<script src="_content/CodeBeam.UltimateAuth.Client.Blazor/uauth.min.js"></script>
108+
```
109+
110+
### 5) Optional: Blazor Usings
111+
Add this in `_Imports.razor`
112+
```csharp
113+
@using CodeBeam.UltimateAuth.Client.Blazor
114+
```
115+
116+
### ✅ Done
59117

60-
- A **production-grade client SDK** for Blazor & MAUI
118+
---
61119

62-
- A **fully interactive sandbox**
63-
where developers can test flows, create accounts, simulate devices, and validate behaviors in real time
120+
## Usage
121+
122+
Inject IUAuthClient and simply call methods.
123+
124+
### Examples
125+
Login
126+
```csharp
127+
[Inject] IUAuthClient UAuthClient { get; set; } = null!;
128+
129+
private async Task Login()
130+
{
131+
var request = new LoginRequest
132+
{
133+
Identifier = "UAuthUser",
134+
Secret = "UAuthPassword",
135+
};
136+
await UAuthClient.Flows.LoginAsync(request);
137+
}
138+
```
139+
140+
Register
141+
```csharp
142+
[Inject] IUAuthClient UAuthClient { get; set; } = null!;
143+
144+
private async Task Register()
145+
{
146+
var request = new CreateUserRequest
147+
{
148+
UserName = _username,
149+
Password = _password,
150+
Email = _email,
151+
};
152+
153+
var result = await UAuthClient.Users.CreateAsync(request);
154+
if (result.IsSuccess)
155+
{
156+
Console.WriteLine("User created successfully.");
157+
}
158+
else
159+
{
160+
Console.WriteLine(result.ErrorText ?? "Failed to create user.");
161+
}
162+
}
163+
```
164+
165+
LogoutAll But Keep Current Device
166+
```csharp
167+
[Inject] IUAuthClient UAuthClient { get; set; } = null!;
168+
169+
private async Task LogoutOthersAsync()
170+
{
171+
var result = await UAuthClient.Flows.LogoutOtherDevicesSelfAsync();
172+
Console.WriteLine(result.IsSuccess);
173+
}
174+
```
175+
176+
UltimateAuth turns Auth into a simple application service — not a separate system you fight against.
177+
- No manual token handling
178+
- No custom HTTP plumbing
179+
- No fragile redirect logic
180+
- All built-in with extensible options.
64181

65182
---
66183

184+
67185
## 📅 Release Timeline (Targeted)
68186

69187
> _Dates reflect targeted milestones and may evolve with community feedback._
70188
71-
### **Q1 2026 — First Release (v 0.0.1 to v 0.1.0)**
72-
- Core session-based auth engine
189+
### **Q1 2026 — First Release**
190+
- v 0.1.0-preview to v 0.1.0
73191

74-
### **Q2 2026 — Stable Feature Release**
192+
### **Q2 2026 — Stable Feature Releases**
193+
- v 0.2.0 to v 0.3.0
75194

76195
### **Q3 2026 — General Availability**
77196
- API surface locked
@@ -83,6 +202,18 @@ UltimateAuth adopts .NET platform versioning to align with the broader ecosystem
83202

84203
---
85204

205+
## 🗺 Roadmap
206+
207+
The project roadmap is actively maintained as a GitHub issue:
208+
209+
👉 https://github.com/CodeBeamOrg/UltimateAuth/issues/8
210+
211+
We keep it up-to-date with current priorities, planned features, and progress.
212+
213+
Feel free to follow, comment, or contribute ideas.
214+
215+
---
216+
86217
## 📘 Documentation
87218

88219
Two documentation experiences will be provided:
@@ -100,20 +231,23 @@ Create accounts, simulate devices, test auth flows, and observe UltimateAuth in
100231
UltimateAuth is a community-first framework.
101232
We welcome proposals, discussions, architectural insights, and contributions of all sizes.
102233

103-
Before contributing, please see:
104-
105-
- `ROADMAP.md` — Release strategy
106-
107234
Discussions are open — your ideas matter.
108235

109236
---
110237

111238
## 🛠 Project Status
112239

113-
UltimateAuth is currently in the design and specification phase.
114-
We are shaping the architecture with real-world requirements, especially from Blazor and MAUI applications.
240+
UltimateAuth core architecture is implemented and validated through the sample application.
241+
242+
We are currently:
243+
244+
- Polishing developer experience
245+
- Reviewing public APIs
246+
- Preparing EF Core integration packages
247+
248+
Preview release is coming soon.
115249

116-
Early API drafts and prototypes will be published soon.
250+
You can check the samples and try what UltimateAuth offers by downloading repo and running locally.
117251

118252
---
119253

UltimateAuth.slnx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
11
<Solution>
2+
<Folder Name="/Packages/">
3+
<Project Path="nuget/CodeBeam.UltimateAuth.EntityFrameworkCore/CodeBeam.UltimateAuth.EntityFrameworkCoreReference.csproj" Id="764569b4-dd5b-4a18-a332-7307d20ee21a" />
4+
<Project Path="nuget/CodeBeam.UltimateAuth.InMemory/CodeBeam.UltimateAuth.InMemory.Bundle.csproj" />
5+
<Project Path="nuget/CodeBeam.UltimateAuth.Reference.Bundle/CodeBeam.UltimateAuth.Reference.Bundle.csproj" Id="f01dee6a-a60d-40a2-bb6a-9894b03e7122" />
6+
</Folder>
27
<Folder Name="/Samples/">
38
<Project Path="samples/blazor-server/CodeBeam.UltimateAuth.Sample.BlazorServer/CodeBeam.UltimateAuth.Sample.BlazorServer.csproj" />
49
<Project Path="samples/blazor-standalone-wasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm/CodeBeam.UltimateAuth.Sample.BlazorStandaloneWasm.csproj" Id="27bd3c4d-65a9-4c70-a6c9-4178b1897730" />
510
<Project Path="samples/resource-api/CodeBeam.UltimateAuth.Sample.ResourceApi/CodeBeam.UltimateAuth.Sample.ResourceApi.csproj" Id="3d877c9b-65eb-45be-b259-431b2d386736" />
611
<Project Path="samples/UAuthHub/CodeBeam.UltimateAuth.Sample.UAuthHub/CodeBeam.UltimateAuth.Sample.UAuthHub.csproj" Id="ae5368ee-10aa-4c75-9653-a7f481849834" />
712
</Folder>
813
<Folder Name="/Solution Items/">
14+
<File Path="Directory.Build.props" />
915
<File Path="Readme.md" />
1016
<File Path="Roadmap.md" />
1117
</Folder>
1218
<Folder Name="/Tests/">
1319
<Project Path="tests/CodeBeam.UltimateAuth.Tests.Unit/CodeBeam.UltimateAuth.Tests.Unit.csproj" Id="6f4b22da-849a-4a79-b5c5-aee7cb1429a6" />
1420
</Folder>
21+
<Project Path="src/authentication/CodeBeam.UltimateAuth.Authentication.EntityFrameworkCore/CodeBeam.UltimateAuth.Authentication.EntityFrameworkCore.csproj" Id="a8d758ad-052e-4331-9bf7-280ea9a55981" />
1522
<Project Path="src/authentication/CodeBeam.UltimateAuth.Authentication.InMemory/CodeBeam.UltimateAuth.Authentication.InMemory.csproj" Id="bd87e254-0565-4fc5-950d-ee5bbb416079" />
1623
<Project Path="src/authorization/CodeBeam.UltimateAuth.Authorization.Contracts/CodeBeam.UltimateAuth.Authorization.Contracts.csproj" Id="40a23002-f885-42a8-bdd9-fd962ab28742" />
1724
<Project Path="src/authorization/CodeBeam.UltimateAuth.Authorization.EntityFrameworkCore/CodeBeam.UltimateAuth.Authorization.EntityFrameworkCore.csproj" Id="8572d1e8-db32-42a1-b61c-e8805e59c019" />
1825
<Project Path="src/authorization/CodeBeam.UltimateAuth.Authorization.InMemory/CodeBeam.UltimateAuth.Authorization.InMemory.csproj" Id="a1e6d007-bdc0-4574-b549-ec863757edd3" />
1926
<Project Path="src/authorization/CodeBeam.UltimateAuth.Authorization.Reference/CodeBeam.UltimateAuth.Authorization.Reference.csproj" Id="84b784d0-bb48-406a-a0d1-c600da667597" />
2027
<Project Path="src/authorization/CodeBeam.UltimateAuth.Authorization/CodeBeam.UltimateAuth.Authorization.csproj" Id="28b1d647-fb0b-4cc3-8503-2680c4a9b28f" />
21-
<Project Path="src/CodeBeam.UltimateAuth.Client.JsMinifier/CodeBeam.UltimateAuth.Client.JsMinifier.csproj" Id="ef5cfc86-bfd3-4f81-a973-ce7ef58e7525" />
22-
<Project Path="src/CodeBeam.UltimateAuth.Client/CodeBeam.UltimateAuth.Client.csproj" Id="eb60a3b7-ba9d-48c9-98ad-b28e879b23bf" />
28+
<Project Path="src/client/CodeBeam.UltimateAuth.Client.Blazor/CodeBeam.UltimateAuth.Client.Blazor.csproj" Id="eb60a3b7-ba9d-48c9-98ad-b28e879b23bf" />
29+
<Project Path="src/client/CodeBeam.UltimateAuth.Client/CodeBeam.UltimateAuth.Client.csproj" Id="fa128a9b-613c-4762-993a-2886280d3051" />
2330
<Project Path="src/CodeBeam.UltimateAuth.Core/CodeBeam.UltimateAuth.Core.csproj" />
2431
<Project Path="src/CodeBeam.UltimateAuth.Server/CodeBeam.UltimateAuth.Server.csproj" Id="0a8cdd12-a8c4-4530-87e8-ae778c46322b" />
2532
<Project Path="src/credentials/CodeBeam.UltimateAuth.Credentials.Contracts/CodeBeam.UltimateAuth.Credentials.Contracts.csproj" Id="88b70848-fa74-40ea-bf34-3fa2f70f4f37" />
2633
<Project Path="src/credentials/CodeBeam.UltimateAuth.Credentials.EntityFrameworkCore/CodeBeam.UltimateAuth.Credentials.EntityFrameworkCore.csproj" Id="1fd362d5-864b-4bb3-97be-9095d94cfdba" />
2734
<Project Path="src/credentials/CodeBeam.UltimateAuth.Credentials.InMemory/CodeBeam.UltimateAuth.Credentials.InMemory.csproj" Id="62ee7b1d-46ce-4f2e-985d-1e794f891b8b" />
2835
<Project Path="src/credentials/CodeBeam.UltimateAuth.Credentials.Reference/CodeBeam.UltimateAuth.Credentials.Reference.csproj" Id="ca03a140-f3dc-4a21-9b7d-895a3b10808b" />
2936
<Project Path="src/credentials/CodeBeam.UltimateAuth.Credentials/CodeBeam.UltimateAuth.Credentials.csproj" Id="2281c3b5-1d60-4542-a673-553f96eed25b" />
30-
<Project Path="src/persistence/CodeBeam.UltimateAuth.EntityFrameworkCore.Abstractions/CodeBeam.UltimateAuth.EntityFrameworkCore.Abstractions.csproj" Id="8867767d-bd1b-4d51-ac3f-0979038165c9" />
37+
<Project Path="src/persistence/CodeBeam.UltimateAuth.EntityFrameworkCore/CodeBeam.UltimateAuth.EntityFrameworkCore.csproj" Id="8867767d-bd1b-4d51-ac3f-0979038165c9" />
38+
<Project Path="src/persistence/CodeBeam.UltimateAuth.InMemory/CodeBeam.UltimateAuth.InMemory.csproj" Id="68de660f-3eb8-4922-b8eb-7ad7c97217ab" />
3139
<Project Path="src/policies/CodeBeam.UltimateAuth.Policies/CodeBeam.UltimateAuth.Policies.csproj" Id="b37c337f-2446-4f54-8684-b72fa83ac444" />
3240
<Project Path="src/security/CodeBeam.UltimateAuth.Security.Argon2/CodeBeam.UltimateAuth.Security.Argon2.csproj" Id="6abfb7a6-ea36-42db-a843-38054dd40fd8" />
3341
<Project Path="src/sessions/CodeBeam.UltimateAuth.Sessions.EntityFrameworkCore/CodeBeam.UltimateAuth.Sessions.EntityFrameworkCore.csproj" Id="5b9a090d-1689-4a81-9dfa-3ba69f0bda38" />
@@ -39,4 +47,5 @@
3947
<Project Path="src/users/CodeBeam.UltimateAuth.Users.InMemory/CodeBeam.UltimateAuth.Users.InMemory.csproj" Id="7ce3df22-4773-4b9b-afd0-8ba506e0f9de" />
4048
<Project Path="src/users/CodeBeam.UltimateAuth.Users.Reference/CodeBeam.UltimateAuth.Users.Reference.csproj" Id="601176dd-b760-4b6f-9cc7-c618134ae178" />
4149
<Project Path="src/users/CodeBeam.UltimateAuth.Users/CodeBeam.UltimateAuth.Users.csproj" Id="30d5db36-6dc8-46f6-9139-8b6b3d6053d5" />
50+
<Project Path="src\client/CodeBeam.UltimateAuth.Client.JsMinifier/CodeBeam.UltimateAuth.Client.JsMinifier.csproj" Id="ef5cfc86-bfd3-4f81-a973-ce7ef58e7525" />
4251
</Solution>

0 commit comments

Comments
 (0)