Commit graph

19 commits

Author SHA1 Message Date
f3a3b63595 WIP PostIt login 2026-06-25 00:08:25 +01:00
2dec799d71 Introduce Yavsc.Interfaces.ISmtpClient and a recording test fake
Narrow ISmtpClient to the four operations MailSender actually uses,
behind a Yavsc.Interfaces.ISmtpClientFactory. Production wires
MailKitSmtpClient (SmtpClientFactory); tests wire a recording fake
(RecordingSmtpClientFactory). The fake is pre-registered in
WebServerFixture so SMTP calls are short-circuited; the EMailling
test now asserts the Connect -> Authenticate -> Send -> Disconnect
sequence. Yavsc.Abstract stays free of MailKit/MimeKit.
2026-06-22 02:09:02 +01:00
b2a35b60ce petite factorisation 2026-06-20 18:43:01 +01:00
86c268eebd deploying the blogs 2026-06-19 23:09:43 +01:00
4398715004 reinstall fixes and reorg 2026-06-19 21:13:17 +01:00
dcf2a93ad0 Split Site:Audience into Site:ExternalUrl + Site:CorsAllowedOrigins
The Site:Audience setting was conflating two distinct concepts: an OAuth
JWT audience (a single resource identifier) and a CORS allow-list (an
array of origins). Collapsing them caused several latent bugs:
- OAuth/JWT validation expected a single string while CORS WithOrigins
  accepts an array.
- Password-reset callback URLs and OAuth client RedirectUri/Origin were
  being built from what was meant to be an audience identifier, not a
  base URL.
- Yavsc.Org's main CORS policy was hardcoded to '*', with no way to
  restrict it without code changes.

Changes:
- SiteSettings.Audience (string) replaced with CorsAllowedOrigins
  (IList<string>).
- OAuth JWT Authority still reads Site:Authority; Audience now reads
  Site:ExternalUrl (Org only; Api/Blogs use ValidateAudience=false).
- MailSender and AccountController build reset-callback URLs from
  Site:ExternalUrl.
- ClientController uses Site:ExternalUrl for OAuth RedirectUri/Origin
  defaults on newly created clients.
- Yavsc.Api and Yavsc.Blogs now read CORS origins from
  Site:CorsAllowedOrigins instead of hardcoded URLs.

Add shared AddYavscCors / AddYavscJwtBearer extension methods in
Yavsc.Server/Helpers/ServiceExtensions.cs to enforce a single
configuration contract across all runtime services (Api, Blogs, Org).
Fails closed when CorsAllowedOrigins is empty; fails fast at startup
when Site:Authority is missing.

Remove obsolete ConfigurationHelpers.GetAudience (no remaining callers).

Local appsettings-*.json files (which carry deployment-specific values
and are gitignored) must be updated to add Site:CorsAllowedOrigins.
2026-06-19 13:15:21 +01:00
5c6d6ee687 refactoring 2026-06-15 00:33:38 +01:00
aabbbc1fea use the helper 2026-06-15 00:11:48 +01:00
e137c3e2ff Fixes the UI testing wwwroot 2026-06-14 20:05:01 +01:00
9415521bcb WIP: refactoring pour déploiement
Non testé en conditions réelles. À valider avant de pousser.
2026-06-14 12:17:03 +01:00
root
198d5bc202 cd contrib; make reinstall 2026-06-13 20:57:30 +01:00
1a0556695c Login settings 2026-06-10 16:59:23 +01:00
fa7d6242f1 postit and them also 2026-06-10 00:23:17 +01:00
57adfc82a5 Start protecting the Api 2026-06-06 21:30:41 +01:00
80144bf9fc refacts, and launching Blogs 2026-06-04 22:04:20 +01:00
e24208e77b refact 2026-05-30 19:34:22 +01:00
6cc0c519d2 tests OK 2026-04-20 00:35:51 +01:00
Paul Schneider
e042e34bf7 refact and login 2026-03-09 02:07:42 +00:00
Paul Schneider
bfb37bc214 Blog Files model 2026-03-01 02:13:26 +00:00