Releases: auth0/auth0-java
3.0.0
🎉 Announcing Release 3.0.0
Overview
We’re excited to share that v3 of the Auth0 Java SDK is now GA! This major release represents a significant evolution of the Java client library for Auth0, designed to make integrating with Auth0’s Authentication and Management APIs simpler, clearer, and more robust for server-side JVM applications.
Changes in this PR
- Updated .version file to v3.0.0
- Added comprehensive v3.0.0 release notes to CHANGELOG.md
- Updated Readme with v3.0.0 version
What’s New in v3
Added Features
- New OpenAPI-generated Management API SDK: Complete rewrite of the Management API client using Fern code generation.
- Improved type safety: using enums
- Automatic pagination:
SyncPagingIterable<T>for automatic pagination - Nullability annotations on generated POJOs
- error handling: unified
ManagementApiExceptionclass - Support for explicit null values in PATCH operations
- HTTP client upgraded to OkHttp 5.2.1
The Management API client has been fully rewritten using Fern OpenAPI code generation. Users will need to update their code when migrating from v2.x to v3.0.0, refer
Key breaking changes include:
- Hierarchical sub-clients replace flat entity APIs.
- Manual pagination removed in favor of SyncPagingIterable
- Unified exception handling via ManagementApiException
- Client initialization updated to ManagementApi.builder()
- Request and response models now use generated, immutable *RequestContent, *ResponseContent, and *RequestParameters types
- Package structure updated across all Management API resources
Deprecated APIs have been removed:
- AuthAPI constructors.
- Legacy authentication and signup helpers.
- Networking helpers, buildNetworkingClient.
- Deprecated method from MultipartRequest.
- Internal EmptyBodyVoidRequest
- Deprecated HttpOptions
- EXAMPLES.md with reference.md
Migration Example
Client Initialization
The Management API client initialization has changed from ManagementAPI to ManagementApi, and uses a different builder pattern.
Before (v2):
import com.auth0.client.mgmt.ManagementAPI;
// Using domain and token
ManagementAPI mgmt = ManagementAPI.newBuilder("{YOUR_DOMAIN}", "{YOUR_API_TOKEN}").build();
// Using TokenProvider
TokenProvider tokenProvider = SimpleTokenProvider.create("{YOUR_API_TOKEN}");
ManagementAPI mgmt = ManagementAPI.newBuilder("{YOUR_DOMAIN}", tokenProvider).build();
After (v3): Approach : Standard Token-Based
import com.auth0.client.mgmt.ManagementApi;
ManagementApi client = ManagementApi
.builder()
.url("https://{YOUR_DOMAIN}/api/v2")
.token("{YOUR_API_TOKEN}")
.build();
📓 Important Notes:
- The Authentication API remains functionally compatible, with deprecated APIs removed
- Complete migration guide available at MIGRATION_GUIDE.md
- This is the stable GA release following V3.0.0-beta.0
3.0.0-beta.0
Warning This SDK is in beta and is subject to breaking changes. It is not recommended for production use, but your feedback and help in testing is appreciated!
Added
Complete rewrite of the Management API client using Fern code generation
Update OkHttp to 5.2.1
API attributes can set null for patch operations
Nullability annotations to POJO classes
Fully compatible Authentication API client — no breaking changes
Migration guide available for upgrading from v2.x