Trigger Authentication

Learn how to enable users to authenticate, log in, and handle different redirection requests.

Authentication controller

To enable users to authenticate themselves, create an instance of AuthenticationController using the domain, clientId, and clientSecret. The AuthenticationController is provided by the auth0-java-mvc-commons SDK. The code below shows how to configure the controller for use with tokens (i.e., domain, clientId, and clientSecret) signed using the RS256 asymmetric signing algorithm. This is done by specifying a JwkProvider (JSON Web Key Provider) to fetch the public key used to verify the token’s signature. See the jwks-rsa-java repository to learn about additional configuration options. If you are using HS256, there is no need to configure the JwkProvider. You can go through this guide to learn about Auth0’s signing algorithms.

Get hands-on with 1200+ tech skills courses.