MCPcopy Index your code
hub / github.com/auth0/auth0-java

github.com/auth0/auth0-java @3.10.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 3.10.0 ↗ · + Follow
71,643 symbols 176,144 edges 3,316 files 12,372 documented · 17%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Note As part of our ongoing commitment to best security practices, we have rotated the signing keys used to sign previous releases of this SDK. As a result, new patch builds have been released using the new signing key. Please upgrade at your earliest convenience.

While this change won't affect most developers, if you have implemented a dependency signature validation step in your build process, you may notice a warning that past releases can't be verified. This is expected, and a result of the key rotation process. Updating to the latest version will resolve this for you.

We are improving our API specs which introduces minor breaking changes.

A Java client library for the Auth0 Authentication and Management APIs.

Build Status Coverage Status License Maven Central javadoc Ask DeepWiki fern shield

:books: Documentation - :rocket: Getting Started - :computer: API Reference :speech_balloon: Feedback

Documentation

  • Reference - code samples for Management APIs.
  • Examples - code samples for common auth0-java scenarios.
  • Migration Guide - guidance for updating your application to use version 3 of auth0-java.
  • Docs site - explore our docs site and learn more about Auth0.

Getting Started

Requirements

Java 8 or above.

auth0-java is intended for server-side JVM applications. Android applications should use the Auth0.Android SDK.

Installation

Add the dependency via Maven:

<dependency>
  <groupId>com.auth0</groupId>
  <artifactId>auth0</artifactId>
  <version>3.10.0</version>
</dependency>

or Gradle:

implementation 'com.auth0:auth0:3.10.0'

Configure the SDK

Authentication API Client

The Authentication API client is based on the Auth0 Authentication API.

Create an AuthAPI instance by providing the Application details from the dashboard.

AuthAPI auth = AuthAPI.newBuilder("{YOUR_DOMAIN}", "{YOUR_CLIENT_ID}", "{YOUR_CLIENT_SECRET}").build();

Management API Client

The Management API client is based on the Management API Docs. In v3, the Management API is Fern-generated and uses ManagementApi as the entry point.

Create a ManagementApi instance with a static token:

ManagementApi mgmt = ManagementApi.builder()
        .domain("{YOUR_DOMAIN}")
        .token("{YOUR_API_TOKEN}")
        .build();

Or use client credentials for automatic token management (recommended for server-to-server applications):

ManagementApi mgmt = ManagementApi.builder()
        .domain("{YOUR_DOMAIN}")
        .clientCredentials("{YOUR_CLIENT_ID}", "{YOUR_CLIENT_SECRET}")
        .build();

The Management API is organized into resource clients. Methods return typed response objects directly:

GetUserResponseContent user = mgmt.users().get("user_id");
GetRoleResponseContent role = mgmt.roles().get("role_id");

You can also obtain a token via the Authentication API and use it with the Management API client:

AuthAPI authAPI = AuthAPI.newBuilder("{YOUR_DOMAIN}", "{YOUR_CLIENT_ID}", "{YOUR_CLIENT_SECRET}").build();
TokenRequest tokenRequest = authAPI.requestToken("https://{YOUR_DOMAIN}/api/v2/");
TokenHolder holder = tokenRequest.execute().getBody();
String accessToken = holder.getAccessToken();
ManagementApi mgmt = ManagementApi.builder()
        .domain("{YOUR_DOMAIN}")
        .token(accessToken)
        .build();

See the Auth0 Management API documentation for more information on how to obtain API Tokens.

API Reference

Feedback

Contributing

We appreciate feedback and contribution to this repo! Before you get started, please see the following:

Raise an issue

To provide feedback or report a bug, please raise an issue on our issue tracker.

Vulnerability Reporting

Please do not report security vulnerabilities on the public Github issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.


<img alt="Auth0 Logo" src="https://github.com/auth0/auth0-java/raw/3.10.0/auth0_light_mode.png" width="150">

Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?

This project is licensed under the MIT license. See the LICENSE file for more info.

Extension points exported contracts — how you extend this code

ClientAssertionSigner (Interface)
Responsible for creating a signed client assertion used to authenticate to the Authentication API @see <a href="https:/ [4 …
src/main/java/com/auth0/client/auth/ClientAssertionSigner.java
TypeStage (Interface)
(no doc) [7 implementers]
src/main/java/com/auth0/client/mgmt/users/types/CreateUserAuthenticationMethodRequestContent.java
NameStage (Interface)
(no doc) [9 implementers]
src/main/java/com/auth0/client/mgmt/actions/types/CreateActionModuleRequestContent.java
TypeStage (Interface)
(no doc) [7 implementers]
src/main/java/com/auth0/client/mgmt/types/CustomDomain.java
NameStage (Interface)
(no doc) [9 implementers]
src/main/java/com/auth0/client/mgmt/types/ConnectionResponseContentSaml.java

Core symbols most depended-on inside this repo

empty
called by 6179
src/main/java/com/auth0/client/mgmt/core/Nullable.java
ofNullable
called by 6121
src/main/java/com/auth0/client/mgmt/core/OptionalNullable.java
get
called by 4162
src/main/java/com/auth0/client/mgmt/core/WrappedAlias.java
body
called by 3354
src/main/java/com/auth0/client/mgmt/types/FlowActionAuth0SendEmailParams.java
absent
called by 3108
src/main/java/com/auth0/client/mgmt/core/OptionalNullable.java
build
called by 3015
src/main/java/com/auth0/client/mgmt/keys/types/ImportEncryptionKeyRequestContent.java
code
called by 2607
src/main/java/com/auth0/client/mgmt/types/CreateActionRequestContent.java
of
called by 2601
src/main/java/com/auth0/client/mgmt/core/OptionalNullable.java

Shape

Method 61,864
Class 5,158
Interface 3,932
Enum 689

Languages

Java100%

Modules by API surface

src/main/java/com/auth0/client/mgmt/types/EventStreamSubscribeEventsResponseContent.java284 symbols
src/main/java/com/auth0/client/mgmt/types/OauthScope.java249 symbols
src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsAzureAd.java226 symbols
src/main/java/com/auth0/client/mgmt/types/CreateClientRequestContent.java191 symbols
src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsGoogleOAuth2.java163 symbols
src/test/java/com/auth0/client/auth/AuthAPITest.java160 symbols
src/main/java/com/auth0/client/mgmt/types/UpdateClientResponseContent.java148 symbols
src/main/java/com/auth0/client/mgmt/types/RotateClientSecretResponseContent.java148 symbols
src/main/java/com/auth0/client/mgmt/types/GetClientResponseContent.java148 symbols
src/main/java/com/auth0/client/mgmt/types/CreateClientResponseContent.java148 symbols
src/main/java/com/auth0/client/mgmt/types/Client.java148 symbols
src/main/java/com/auth0/client/mgmt/types/ConnectionOptionsWindowsLive.java147 symbols

For agents

$ claude mcp add auth0-java \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page