A modular authentication and authorization extension for the CraftsNet framework.
CraftsNet Security introduces flexible authentication chains, scoped access control, token-based authentication, and extensible persistence drivers for CraftsNet applications.
- Modular authentication chain system
- Token-based authentication
- Scope-based authorization
- Group-based authorization
- Extensible storage driver architecture
- File and SQL drivers included
- SQL schema migration system
- Hot reload support for file-based stores
- Automatic cache revalidation
There are currently three modules:
- common
- Addon class:
de.craftsblock.cnet.modules.security.CraftsNetSecurity - Addon name:
CraftsNetSecurity
- Addon class:
- token
- Addon class:
de.craftsblock.cnet.modules.security.token.CraftsNetSecurityToken - Addon name:
CraftsNetSecurityToken - Requires:
common
- Addon class:
- token-sql
- Addon class:
de.craftsblock.cnet.modules.security.token.CraftsNetSecurityTokenSQLDriver - Addon name: `CraftsNetSecurityTokenSQLDriver
- Requires:
common,token
- Addon class:
Warning
You need to depend on the module addon classes that you use to allow proper initialization.
Use the depends field in your addon.json for file addons or the @Depends annotation on your addon class for in-app addons. You can use the
depends field and the @Depends annotation simultaneously.
repositories {
maven {
name = "craftsblockReleases"
url = "https://repo.craftsblock.de/releases"
}
}
dependencies {
implementation("de.craftsblock.craftsnet.modules.security:<MODULE>:<VERSION>")
}<repositories>
<repository>
<id>craftsblock-releases</id>
<name>CraftsBlock Repositories</name>
<url>https://repo.craftsblock.de/releases</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>de.craftsblock.craftsnet.modules.security</groupId>
<artifactId>MODULE</artifactId>
<version>VERSION</version>
</dependency>
</dependencies>| CraftsNet Version | Compatible |
|---|---|
| >= 3.7.2 | ✅ |
| 3.7.0 & 3.7.1 | 🧪 |
| < 3.7.0 | ❌ |