Commit graph

33 commits

Author SHA1 Message Date
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
cba18df870 Fixes the css 2026-06-14 23:04:24 +01:00
d0e594c359 synchro with main 2026-06-14 18:30:15 +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
1a0556695c Login settings 2026-06-10 16:59:23 +01:00
e24208e77b refact 2026-05-30 19:34:22 +01:00
95dec3636a Use InMemory db driver at testing 2026-05-28 22:18:26 +01:00
5620213cf5 better 2026-04-19 20:36:03 +01:00
87d62791b8 fix: test infrastructure with in-memory DB, SMTP mocking, and thread-safe billing configuration
- Add in-memory database support for test isolation in WebServerFixture
- Implement TestMailSender fake SMTP provider for email test support
- Add thread synchronization to billing service registration to prevent race conditions
- Make RegisterBilling<T> idempotent to safely handle reconfiguration
- Configure test environment via in-memory settings (UseTestEmailSender, UseInMemoryDatabase)
- Add regression tests for billing module idempotency and duplicate registration detection
- Fix tests: EMaillingTests.SendEMailSynchrone, BillingServiceTests (2 tests), HaveConfigurationRoot (3 tests)

All core test infrastructure tests now passing.
2026-04-19 14:40:40 +01:00
Paul Schneider
e042e34bf7 refact and login 2026-03-09 02:07:42 +00:00
Paul Schneider
93f0c2d25e cleanup 2026-03-01 14:09:10 +00:00
Paul Schneider
40e8e08690 reorg 2026-02-28 21:17:54 +00:00
Paul Schneider
45514010f2 REORG 2026-02-14 16:54:27 +00:00
Paul Schneider
bcadc733bb refacts 2025-11-16 15:53:13 +00:00
Paul Schneider
4c653f1bf6 AspNetRoles ... 2025-07-31 11:44:02 +01:00
Paul Schneider
b3d565b6d9 Refactoring
The main server owns the migrations, it's the server part,
it's simpler.

It's Yavsc, not one of its lib.
2025-07-15 20:17:39 +01:00
Paul Schneider
8fc1153e59 testing 2025-07-14 20:35:13 +01:00
Paul Schneider
6c175783a9 Externl Login 2025-07-10 15:19:28 +01:00
Paul Schneider
9b7a6c0125 refact 2025-06-29 18:44:35 +01:00
Paul Schneider
e794c22f4e refactoring 2025-06-29 16:12:16 +01:00
Paul Schneider
4941f3bdef Implémentation de la publication d'un billet 2025-06-28 16:14:52 +01:00
Paul Schneider
380f2314dc Code cleanup 2025-03-04 18:05:21 +00:00
Paul Schneider
2bc0ce7a18 share the workflow config 2025-02-26 18:59:08 +00:00
Paul Schneider
b9ba97f5e8 User settings 2025-02-24 23:29:48 +00:00
Paul Schneider
71262647b3 permission handling 2025-02-23 20:23:34 +00:00
Paul Schneider
9e6a4f7d13 Get User Id from Web API 2025-02-17 23:57:12 +00:00
Paul Schneider
25b261f4ee more services from Web API 2025-02-15 12:45:27 +00:00
Paul Schneider
8e8f4d3896 refactoring 2025-02-14 22:44:33 +00:00
ff1444d664 principalement du format de code 2020-09-14 14:31:14 +01:00
ccc91bbf19 files tree made better. 2019-01-01 16:29:36 +00:00