Skip to content

Commit c2955a7

Browse files
committed
Merge main branch
2 parents 66250f0 + 9379b76 commit c2955a7

40 files changed

Lines changed: 1845 additions & 2002 deletions

.github/workflows/build-and-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ jobs:
1717
java-version: 17
1818

1919
- name: Set up Gradle
20-
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
20+
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
2121

2222
- name: Test and Assemble with Gradle
2323
run: ./gradlew assemble check --continue --console=plain
2424

25-
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
25+
- uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
2626
with:
2727
flags: unittests
2828

29-
- uses: actions/upload-artifact@v5
29+
- uses: actions/upload-artifact@v6
3030
with:
3131
name: Reports
3232
path: |

.github/workflows/claude-code-review.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/gradle-wrapper-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v6
10-
- uses: gradle/actions/wrapper-validation@v5
10+
- uses: gradle/actions/wrapper-validation@v5.0.2

.github/workflows/rl-scanner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
java-version: ${{ inputs.java-version }}
4242

4343
- name: Set up Gradle
44-
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
44+
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
4545

4646
- name: Test and Assemble with Gradle
4747
run: ./gradlew assemble check --continue --console=plain

.github/workflows/sca_scan.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,6 @@ target/
172172
### Test results ###
173173
**/test-results/
174174
**/reports/
175+
176+
### Claude Code ###
177+
.claude/settings.local.json

.shiprc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"files": {
3+
".version": [],
4+
"README.md": [
5+
"<version>{MAJOR}.{MINOR}.{PATCH}</version>",
6+
"`{MAJOR}.{MINOR}.{PATCH}`"
7+
],
8+
"auth0-springboot-api/README.md": [
9+
"<version>{MAJOR}.{MINOR}.{PATCH}</version>",
10+
"auth0-springboot-api:{MAJOR}.{MINOR}.{PATCH}"
11+
]
12+
},
13+
"prefixVersion": false
14+
}

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.0-beta.1
1+
1.0.0-beta.0

CHANGELOG.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Changelog
2+
3+
## [1.0.0-beta.0](https://github.com/auth0/auth0-auth-java/tree/1.0.0-beta.0) (2026-03-02)
4+
5+
### Features
6+
7+
- **JWT Bearer Authentication** - Complete Spring Security integration for validating Auth0-issued JWTs.
8+
- **DPoP (Demonstration of Proof-of-Possession) Support** - Built-in support for DPoP token security per [RFC 9449](https://datatracker.ietf.org/doc/html/rfc9449), including proof validation, token binding, and JWK thumbprint verification.
9+
- **Flexible Authentication Modes** - Configure how your API handles token types:
10+
- `DISABLED` - Accept Bearer tokens only.
11+
- `ALLOWED` - Accept both Bearer and DPoP tokens (default).
12+
- `REQUIRED` - Enforce DPoP tokens only.
13+
- **Scope-Based Authorization** - Derive Spring Security authorities from JWT scopes with `SCOPE_` prefix for use with `hasAuthority()`.
14+
- **Custom Claim Access** - Access any JWT claim via `Auth0AuthenticationToken.getClaim(name)` and `getClaims()`.
15+
- **Auto-Configuration** - Minimal setup required; just provide `auth0.domain` and `auth0.audience` properties.
16+
- **WWW-Authenticate Header Generation** - Automatic RFC-compliant error response headers for Bearer and DPoP challenges.
17+
- **Java 8+ Core Module** - The underlying `auth0-api-java` module targets Java 8, enabling use in non-Spring environments.
18+
19+
### Installation
20+
21+
**Gradle**
22+
23+
```groovy
24+
implementation 'com.auth0:auth0-springboot-api:1.0.0-beta.0'
25+
```
26+
27+
**Maven**
28+
29+
```xml
30+
<dependency>
31+
<groupId>com.auth0</groupId>
32+
<artifactId>auth0-springboot-api</artifactId>
33+
<version>1.0.0-beta.0</version>
34+
</dependency>
35+
```
36+
37+
### Basic Usage
38+
39+
**1. Add application properties:**
40+
41+
```yaml
42+
auth0:
43+
domain: "your-tenant.auth0.com"
44+
audience: "https://your-api-identifier"
45+
dpopMode: ALLOWED # DISABLED | ALLOWED | REQUIRED
46+
```
47+
48+
**2. Configure Spring Security:**
49+
50+
```java
51+
@Configuration
52+
@EnableMethodSecurity
53+
public class SecurityConfig {
54+
55+
@Bean
56+
SecurityFilterChain apiSecurity(HttpSecurity http, Auth0AuthenticationFilter authFilter)
57+
throws Exception {
58+
return http
59+
.csrf(csrf -> csrf.disable())
60+
.sessionManagement(s -> s.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
61+
.authorizeHttpRequests(auth -> auth
62+
.requestMatchers("/api/public").permitAll()
63+
.requestMatchers("/api/protected").authenticated()
64+
.requestMatchers("/api/admin/**").hasAuthority("SCOPE_admin")
65+
.anyRequest().permitAll())
66+
.addFilterBefore(authFilter, UsernamePasswordAuthenticationFilter.class)
67+
.build();
68+
}
69+
}
70+
```
71+
72+
**3. Access authenticated user info in your controller:**
73+
74+
```java
75+
@RestController
76+
@RequestMapping("/api")
77+
public class ApiController {
78+
79+
@GetMapping("/protected")
80+
public ResponseEntity<Map<String, Object>> protectedEndpoint(Authentication authentication) {
81+
Auth0AuthenticationToken token = (Auth0AuthenticationToken) authentication;
82+
return ResponseEntity.ok(Map.of(
83+
"user", authentication.getName(),
84+
"email", token.getClaim("email"),
85+
"scopes", token.getScopes()
86+
));
87+
}
88+
}
89+
```
90+
91+
### Dependencies
92+
93+
| Dependency | Version | Module |
94+
|---|---|---|
95+
| Spring Boot Starter | 3.2.0 | auth0-springboot-api |
96+
| Spring Boot Starter Web | 3.2.0 | auth0-springboot-api |
97+
| Spring Boot Starter Security | 3.2.0 | auth0-springboot-api |
98+
| Jackson Databind | 2.15.2 | auth0-api-java |
99+
| Apache HttpClient | 4.5.14 | auth0-api-java |
100+
| Auth0 java-jwt | 4.5.1 | auth0-api-java |
101+
| Auth0 jwks-rsa | 0.23.0 | auth0-api-java |
102+
103+
**Runtime Requirements:**
104+
- `auth0-springboot-api` — Java 17+
105+
- `auth0-api-java` — Java 8+

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
![Java Version](https://img.shields.io/badge/java-8%2B-blue)
77
![License](https://img.shields.io/badge/license-MIT-green)
88

9-
A comprehensive Java library for Auth0 JWT authentication with built-in **DPoP (Demonstration of Proof-of-Possession)** support. This multi-module project provides both a core authentication library and Spring Boot integration for secure API development.
9+
A comprehensive Java library for Auth0 JWT authentication with built-in **DPoP (Demonstration of Proof-of-Possession)** support. This project provides Spring Boot integration for secure API development.
1010

1111
## 🏗️ Architecture Overview
1212

@@ -37,15 +37,15 @@ If you're building a Spring Boot application, use the Spring Boot integration:
3737
<dependency>
3838
<groupId>com.auth0</groupId>
3939
<artifactId>auth0-springboot-api</artifactId>
40-
<version>1.0.0-SNAPSHOT</version>
40+
<version>1.0.0-beta.0</version>
4141
</dependency>
4242
```
4343

4444
**👉 [Get started with Spring Boot integration →](./auth0-springboot-api/README.md)**
4545

4646
### For Core Java Applications
4747

48-
The core library (`auth0-api-java`) is currently an internal module used by the Spring Boot integration. It provides:
48+
It provides:
4949

5050
- JWT validation with Auth0 JWKS integration
5151
- DPoP proof validation per [RFC 9449](https://datatracker.ietf.org/doc/html/rfc9449)
@@ -78,11 +78,11 @@ This project uses Gradle with a multi-module setup:
7878

7979
## 📦 Publishing
8080

81-
Only the Spring Boot integration module is published as a public artifact:
81+
Spring Boot integration module is published as a public artifact:
8282

83-
| Module | Group ID | Artifact ID | Version | Status |
84-
| ---------------------- | ----------- | ---------------------- | ---------------- | ---------------- |
85-
| `auth0-springboot-api` | `com.auth0` | `auth0-springboot-api` | `1.0.0-SNAPSHOT` | 📦 **Published** |
83+
| Module | Group ID | Artifact ID | Version | Status |
84+
| ---------------------- | ----------- | ---------------------- |----------------| ---------------- |
85+
| `auth0-springboot-api` | `com.auth0` | `auth0-springboot-api` | `1.0.0-beta.0` | 📦 **Published** |
8686

8787
The core library (`auth0-api-java`) is bundled as an internal dependency within the Spring Boot module and is not published separately.
8888

0 commit comments

Comments
 (0)