Skip to content

Commit f721a4a

Browse files
committed
feat(doc): Update README
1 parent c6697e0 commit f721a4a

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,22 @@ Configure [App Permission Schema](schema/cosec-app-permission.schema.json) to su
341341
}
342342
```
343343

344+
## Obtain the current security context
345+
346+
### WebFlux
347+
348+
```kotlin
349+
Mono.deferContextual {
350+
val securityContext = it.getSecurityContext()
351+
//TODO
352+
}
353+
```
354+
355+
### WebMvc
356+
357+
```
358+
SecurityContextHolder.context
359+
```
344360
## OpenTelemetry
345361

346362
[CoSec-OpenTelemetry](cosec-opentelemetry)

README.zh-CN.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,22 @@ class CustomConditionMatcher(configuration: Configuration) :
341341
]
342342
}
343343

344+
```
345+
## 获取当前安全上下文
346+
347+
### WebFlux
348+
349+
```kotlin
350+
Mono.deferContextual {
351+
val securityContext = it.getSecurityContext()
352+
//TODO
353+
}
354+
```
355+
356+
### WebMvc
357+
358+
```
359+
SecurityContextHolder.context
344360
```
345361

346362
## OpenTelemetry

0 commit comments

Comments
 (0)