Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
99f42ac
chore: Migrate to publish plugin
CrAfTsArMy Jan 11, 2026
39a866e
refactor: Rebuild auth system from scratch
CrAfTsArMy Jan 14, 2026
738167b
feat: Add getType to AuthResult
CrAfTsArMy Jan 18, 2026
b386fb5
feat: First preview of the new token
CrAfTsArMy Jan 18, 2026
a7ccb77
feat: Add scope filters
CrAfTsArMy Jan 18, 2026
f23b379
feat: Add a file token store driver
CrAfTsArMy Jan 23, 2026
72e59ea
chore: Allow RequireScope on methods
CrAfTsArMy Jan 23, 2026
f69ab5e
chore: Bump version of craftscore to 3.8.13-pre7
CrAfTsArMy Jan 23, 2026
d4e6a6e
docs: Bump minimum version of craftsnet to 3.7.0
CrAfTsArMy Jan 23, 2026
9351393
chore: Default to file token store driver
CrAfTsArMy Jan 23, 2026
213115a
fix: Use static reference for getAuthChain
CrAfTsArMy Jan 23, 2026
87f030f
fix: Scopes are now applicable for websockets
CrAfTsArMy Jan 23, 2026
eefb956
chore: Create token file if not exists
CrAfTsArMy Jan 23, 2026
0e481ef
chore: Use byte[] for token validation
CrAfTsArMy Jan 23, 2026
b0fd2b0
fix: Serialize token data as empty if empty
CrAfTsArMy Jan 23, 2026
f8e2b99
feat: Add first preview of websocket token auth
CrAfTsArMy Jan 23, 2026
737b9b8
chore: Bump version of craftscore to 3.8.13-pre8
CrAfTsArMy Jan 23, 2026
796feb5
chore: Bump version of craftsnet to 3.7.0-pre8
CrAfTsArMy Jan 23, 2026
ef5b069
feat: Add first preview of http token auth
CrAfTsArMy Jan 24, 2026
8fb96c3
fix: Fail and warn if not http token auth is set
CrAfTsArMy Jan 24, 2026
0b8c11f
fix: Better console output on scope mismatch
CrAfTsArMy Jan 24, 2026
cb70f2a
feat: Add token events
CrAfTsArMy Jan 24, 2026
2c88a88
chore: Rename getToken to getValidatedToken
CrAfTsArMy Jan 27, 2026
2544141
feat: Add token caching
CrAfTsArMy Jan 27, 2026
d15aa97
chore: Make the driver reload method public
CrAfTsArMy Jan 27, 2026
f9038d7
chore: Delegate to super on file token deletion
CrAfTsArMy Jan 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ addons
logs
libraries

.env
.env.repo

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@

| CraftsNet Version | Compatible |
|-------------------|------------|
| >= 3.4.1-SNAPSHOT | ✅ |
| <= 3.4.0-SNAPSHOT | ❌ |
| >= 3.7.0 | ✅ |
| <= 3.7.0 | ❌ |
87 changes: 29 additions & 58 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
plugins {
id 'java'
id 'maven-publish'
}

def env = new Properties()
file(".env").withInputStream {
env.load(it)
id "de.craftsblock.gradle.publish" version "0.0.20"
}

java {
Expand All @@ -29,27 +25,15 @@ dependencies {
// CraftsBlock dependencies ----------------------------------------------------------------------------------------

// https://repo.craftsblock.de/#/releases/de/craftsblock/craftscore/bom
implementation platform("de.craftsblock.craftscore:bom:3.8.12")

// https://repo.craftsblock.de/#/releases/de/craftsblock/craftscore/event
implementation "de.craftsblock.craftscore:event"

// https://repo.craftsblock.de/#/releases/de/craftsblock/craftscore/json
implementation "de.craftsblock.craftscore:json"

// https://repo.craftsblock.de/#/releases/de/craftsblock/craftscore/sql
implementation "de.craftsblock.craftscore:sql"

// https://repo.craftsblock.de/#/releases/de/craftsblock/craftscore/utils
implementation "de.craftsblock.craftscore:utils"
implementation platform("de.craftsblock.craftscore:bom:3.8.13-pre8")

// https://repo.craftsblock.de/#/releases/de/craftsblock/craftsnet
implementation "de.craftsblock:craftsnet:3.5.6-pre6"
implementation "de.craftsblock:craftsnet:3.7.0-pre8"

// Third party dependencies ----------------------------------------------------------------------------------------

// https://mvnrepository.com/artifact/org.springframework.security/spring-security-crypto
implementation 'org.springframework.security:spring-security-crypto:6.5.0'
implementation 'org.springframework.security:spring-security-crypto:7.0.2'

// https://mvnrepository.com/artifact/org.jetbrains/annotations
implementation 'org.jetbrains:annotations:26.0.2'
Expand All @@ -73,45 +57,32 @@ jar {
}
}

publishing {
publications {
normal(MavenPublication) {
artifactId "security"
from components.java
pom {
name = 'Security'
description = 'Protect your CraftsNet Restful API with an token-based access control system'

scm {
url = 'https://github.com/CraftsBlock/CraftsNet-Security'
connection = 'scm:git:git://github.com/CraftsBlock/CraftsNet-Security.git'
developerConnection = 'scm:git:git@github.com:CraftsBlock/CraftsNet-Security.git'
}

issueManagement {
system = 'github'
url = 'https://github.com/CraftsBlock/CraftsNet-Security/issues'
}

licenses {
license {
name = 'GNU General Public License v3.0'
url = 'https://github.com/CraftsBlock/CraftsNet-Security/blob/master/LICENSE'
}
}
}
craftsPublish {
artifactId = "security"
name = "CraftsNet"

component = project.components.java

pom {
name = "Security"
description = "Protect your CraftsNet API with easy drop in security features."

scm {
url = 'https://github.com/CraftsBlock/CraftsNet-Security'
connection = 'scm:git:git://github.com/CraftsBlock/CraftsNet-Security.git'
developerConnection = 'scm:git:git@github.com:CraftsBlock/CraftsNet-Security.git'
}
}
repositories {
maven {
url('https://repo.craftsblock.de/experimental')
authentication {
basic(BasicAuthentication)
}
credentials {
username = env["username"]
password = env["password"]

issueManagement {
system = 'github'
url = 'https://github.com/CraftsBlock/CraftsNet-Security/issues'
}

licenses {
license {
name = 'GNU General Public License v3.0'
url = 'https://github.com/CraftsBlock/CraftsNet-Security/blob/master/LICENSE'
}
}
}
}
}
9 changes: 9 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
pluginManagement {
repositories {
maven {
url = uri("https://repo.craftsblock.de/releases")
}
gradlePluginPortal()
}
}

rootProject.name = 'Security'

This file was deleted.

148 changes: 0 additions & 148 deletions src/main/java/de/craftsblock/cnet/modules/security/CNetSecurity.java

This file was deleted.

Loading