🛡️
基于策略的授权
AWS IAM 启发的拒绝优先评估引擎。可组合的策略,支持 ActionMatcher 和 ConditionMatcher SPI 扩展。
// build.gradle.kts
implementation("me.ahoo.cosec:cosec-spring-boot-starter:<version>")# application.yaml
cosec:
jwt:
algorithm: hmac256
secret: your-secret-key-here
authorization:
local-policy:
enabled: true
init-repository: true| 技术 | 版本 | 用途 |
|---|---|---|
| Kotlin | 2.3.20 | 主要语言 |
| Java | 17 | 目标 JVM |
| Spring Boot | 4.0.5 | 应用框架 |
| Project Reactor | - | 响应式编程 |
| JWT (auth0) | 4.5.1 | 令牌处理 |
| CoCache | 4.0.2 | 分布式缓存 |
| JustAuth | 1.16.7 | 社交认证 |
| OpenTelemetry | 2.26.1 | 可观测性 |