ddd4j-auth
Installation
SKILL.md
ddd4j Auth
Overview
All three frameworks map onto the ddd4j Subject/AuthPrincipal/SubjectProvider; domain and application code never binds directly to a concrete security context.
When to Use
- Choosing between Sa-Token, Apache Shiro, and Spring Security for a ddd4j project.
- Implementing a
SubjectProviderthat maps the framework's identity ontoAuthPrincipal(profile, roles, permissions). - Wiring temporary tokens (
SaTempToken), API keys, or multiple account types viaStpKit.DEFAULT/ADMIN/USER. - Binding the Subject into the request context at entry and cleaning it up at request end.
- Converting framework exceptions (login expired, insufficient permission) into stable web errors.
- Reviewing anonymous, expired, insufficient-role, thread-reuse, and logout test coverage.
When NOT to Use
Do not use this skill when: