Skip to content

Feat: Revamp Java EE Quickstart#702

Open
tanya732 wants to merge 2 commits intomainfrom
feat/SDK-7460
Open

Feat: Revamp Java EE Quickstart#702
tanya732 wants to merge 2 commits intomainfrom
feat/SDK-7460

Conversation

@tanya732
Copy link
Contributor

Description

Revamp the existing Java EE quickstart to match the latest quickstart standards.

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

@tanya732 tanya732 requested review from a team as code owners February 27, 2026 18:32
@github-actions
Copy link

github-actions bot commented Feb 27, 2026

Summary

Status Count
🔍 Total 6
✅ Successful 4
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 2
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 0
Full Github Actions output

1. Go to the [Auth0 Dashboard](https://manage.auth0.com/#/applications) and navigate to **Applications > Applications > Create Application**.
2. Enter a name for your application (e.g., "My Java EE App").
3. Select **Regular Web Applications** as the application type.
4. Click **Create**.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inclusive language - please update to Choose or Select rather than click.

7. Scroll down to **Application URIs** and set:
- **Allowed Callback URLs**: `http://localhost:8080/callback`
- **Allowed Logout URLs**: `http://localhost:8080/`
8. Click **Save Changes**.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same ^

</Tabs>

<Info>
Make sure to [set up connections](https://auth0.com/docs/authenticate/identity-providers) for your application so users can log in using their preferred identity provider.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(/docs/authenticate/identity-providers) populates as an internal link rather than an external link.

</Info>
</Step>
<Step title="Configure authentication" stepNumber={4}>
Update your `web.xml` to store Auth0 configuration as JNDI environment entries. Replace the placeholder values with the **Domain**, **Client ID**, and **Client Secret** from your Auth0 application settings. Create a `jboss-web.xml` to configure the JASPIC security domain required by the Java EE 8 Security API, an `Auth0AuthenticationConfig.java` CDI bean to read the configuration from JNDI, and an `Auth0AuthenticationProvider.java` CDI producer to build the `AuthenticationController`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Application Settings is capitalized in Dashboard, so we keep to that convention.

Update your `web.xml` to store Auth0 configuration as JNDI environment entries. Replace the placeholder values with the **Domain**, **Client ID**, and **Client Secret** from your Auth0 application settings. Create a `jboss-web.xml` to configure the JASPIC security domain required by the Java EE 8 Security API, an `Auth0AuthenticationConfig.java` CDI bean to read the configuration from JNDI, and an `Auth0AuthenticationProvider.java` CDI producer to build the `AuthenticationController`.

<Info>
Do not include `https://` in your `auth0.domain` value. Use only the domain, e.g., `dev-abc123.us.auth0.com`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use only the domain and region. For example: dev-abc123.us.auth0.com.

</Check>

// Build logout URL like:
// https://{YOUR-DOMAIN}/v2/logout?client_id={YOUR-CLIENT-ID}&returnTo=http://localhost:3000/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{YOUR_AUTH0_DOMAIN}

If you receive an `a0.invalid_state` error after login, the state cookie was not found or does not match the state returned from Auth0.

To build and run the sample, execute the `wildfly:run` Maven goal to start an embedded WildFly application server with this application deployed to it. See the [WildFly Maven Plugin](https://docs.jboss.org/wildfly/plugins/maven/latest/) documentation for more information.
Verify that:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

849-851 need ending punctuation

A sample Java EE application integrated with Auth0 is available on GitHub:

<Card title="Java EE Sample Application" icon="github" href="https://github.com/auth0-samples/auth0-java-ee-sample/tree/master/01-Login">
Includes login, logout, user profile and other examples.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing comma before the "and"

},
{
"source": "/docs/quickstart/webapp/java-ee/interactive",
"destination": "/docs/quickstart/webapp/java-ee"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: is this page supposed to be redirected to "docs/quickstart/webapp/java-ee/index"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants