This page is for Authlete 3.0. For 2.x, see Using Demo Authorization Server (2.x).
Note: Get an overview of the Authlete Management Console by reading Getting Started.
Requirements
This quickstart requires either:- Docker 1.29 or later
- Java
Step 1: Register for an Authlete Account
To manage and run authorization services, you need an Authlete Account. An Authlete account is free for up to 30 days. You can use a social login, or login using a traditional email/password.Step 2: Create an Organization
- Log in to the Authlete Console.
- Create a new organization named
acme.
Step 3: Create a Service
- Switch to your newly created
acmeorganization. - Create a new service with a name like
Demo AS, under this organization. - Keep all settings as default for now.
- Click Create. Make sure to note down the Service ID for use in Step 5.
Step 4: Generate a Service Access Token
- Go to Service Settings and select Basic Settings.
- Open the Advanced tab.
- In the Access Tokens section, enter a name like
Demo AS. - Click Create to generate the token. Make sure to copy the token for use in Step 5.
Step 5: Set Up Demo AS
- Clone the Authlete Java OAuth Server repository, one of several reference authorization server implementations available on GitHub:
-
Configure the
authlete.propertiesfile to connect the authorization server to the Authlete service created in the Step 3.- Replace
<<Service_ID>>with the Service ID from Step 3. - Replace
<<SERVICE_ACCESS_TOKEN>>with the Access Token from Step 4. - Adjust the
base_urlaccording to your api cluster region:base_url = https://<<api-cluster-region>>.authlete.com
- Replace
- The
authlete.propertiesfile includes commented values for Authlete properties that will not be processed by default. Be sure to uncomment Authlete property values before running the server.
-
Run the server using either Docker (recommended) or Java:
- Using Docker (preferred): Use the following command to start the server:
-
Using Java:
Ensure that you have Maven installed and
JAVA_HOMEis set correctly. Then, run the following command:
Step 6: Verify the Setup
- Open your browser and go to
http://localhost:8080. - You should see the home page of the Demo authorization server.
Step 7: Create a Client
- To test the authorization server, you need to create a client in the Authlete Console.
- Navigate to your Demo AS within the Authlete Console.
-
Click Create Client, enter a descriptive name for the client, and click Create.
- Note down the Client ID for later use.
-
Go to Endpoints -> Global Settings -> Redirect URIs and click Add URI. Add the following Redirect URI:
https://oidcdebugger.com/debug
-
Leave all other settings as default and click Save Changes.
Step 8: Test Your Authorization Server
OAuth2 Authorization Code Flow
-
Visit OpenID Connect Debugger and provide the following details:
- Authorize URI:
http://localhost:8080/api/authorization - Client ID: Enter the Client ID you copied from Step 6.
- Authorize URI:
-
Set the Response type to
codeand Response mode toform_post. - (Optional) To test PKCE, select the Use PKCE checkbox. PKCE is enabled by default on your Authlete Service.
-
Scroll down and click the Send Request button to start the authorization process.
- Login ID:
max - Password:
max
Issue an ID Token (Implicit Flow)
- Click Start over to return to the home page.
-
Set the Response type to
id_token. - Click Send Request to initiate a new authorization process.
-
You will be redirected back to the debugger with a JWT ID Token issued by Authlete.
Security Note: ⚠️ For this demo setup, the ID Token is signed using theAnd that’s it! 🎉 You’ve successfully set up and tested your authorization server with Authlete. Now that your authorization server is up and running, you can explore more advanced features and configurations:client_secretand theHS256algorithm. This configuration is intended for demo purposes only. For real-world applications, you should upload your JSON Web Key (JWK) and use an asymmetric signing algorithm likeRS256.
- Explore the API Reference Documentation for more details on Authlete APIs used by your authorization server: Check the API Docs