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 SubjectProvider that maps the framework's identity onto AuthPrincipal (profile, roles, permissions).
  • Wiring temporary tokens (SaTempToken), API keys, or multiple account types via StpKit.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:

Installs
7
First Seen
Sep 22, 2026