Split into per-article modules and add the method-security module
Moves the existing virtual-thread/context-propagation project into context-propagation/ and adds method-security/ for the Spring Security 7 method-security article: nine runnable demos, fourteen assertions, and every transcript the article quotes, regenerated by scripts/run-all.sh. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSrsDSRKVsY588yFiMJMo9
This commit is contained in:
6
context-propagation/docs/output/demo5.txt
Normal file
6
context-propagation/docs/output/demo5.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
=== Demo 5: ReactiveSecurityContextHolder vs. ThreadLocal across a scheduler hop ===
|
||||
A) SecurityContextHolder (ThreadLocal), no scheduler hop: authenticated as alice
|
||||
B) SecurityContextHolder (ThreadLocal), AFTER publishOn to a different thread: NO AUTHENTICATION (lost) [proves ThreadLocal doesn't survive a scheduler hop]
|
||||
C) ReactiveSecurityContextHolder + contextWrite, no scheduler hop: Hello, carol
|
||||
D) ReactiveSecurityContextHolder + contextWrite, AFTER publishOn to a different thread: Hello, dave [Context travels with the stream, not the thread]
|
||||
E) getProfile() with no contextWrite() upstream at all: Anonymous [defaultIfEmpty fires; getContext() completes empty, it does not error]
|
||||
Reference in New Issue
Block a user