Framework
ApiHug SDK spring security extension
The security framework provides authentication, authorization, and protection against common attacks.
ApiHug offers a minimalist and efficient security solution, different from traditional frameworks like Apache Shiro or Spring Security.
It is still based on resource (API) permission management, combined with roles, creating a very simple RBAC (Role-Based Access Control) structure that is ready to use out of the box.
How to define the protocol at the Proto layer: Minimal Authentication & Authorization
Currently, the Aspect SecurityAspect only supports BEFORE checks, meaning it validates before entering the resource (API) business logic.
Configuration path: hope.security
; Configuration object: HopeSecurityProperties
.
Configuration | Remarks |
---|---|
enabled | Whether to enable ApiHug Security. |
jwt | JWT configuration. |
jwt.base64Secret | Base64 secret. |
jwt.secret | Secret. |
jwt.tokenValidityInSecondsForRememberMe | Validity period for Remember Me, default is 30 days. |
jwt.tokenValidityInSeconds | Default validity time, 7 days. |
To be done 🏗️