Skip to main content
This document describes how to implement your developer authentication callback endpoint.

1. Target Readers

You need to implement your developer authentication callback endpoint (and so have to read this document) only if you want to let (third-party) developers use Developer Console.
Need to Read?As a special behavior, the login form of Developer Console accepts the pair of API key & API secret of the corresponding service as if it were a valid pair of ID & password of a developer. Therefore, if you are the only person who manages client applications for your service, you don’t have to implement a developer authentication callback endpoint. In this case, you don’t have to read this document.Authlete provides Web APIs to manage client applications such as /client/create. Using such Authlete Web APIs, you can build your own tools to manage client applications. If you do it, you don’t have to use Developer Console and so you don’t have to implement a developer authentication callback.

2. What is “Developer Authentication Callback Endpoint”?

Developer authentication callback is a Web API that you are required to implement to authenticate developers. Authlete calls the Web API when developer authentication is needed.

3. Why Is Developer Authentication Callback Endpoint Needed?

Since Authlete does NOT have any database table to manage developer accounts, Authlete cannot perform developer authentication. This is by design. Therefore, Authlete delegates developer authentication to your developer authentication callback endpoint.

4. Settings

Authlete needs to know the location of your developer authentication callback endpoint, so it is required to set necessary information via Service Owner Console. Please follow the steps below.
  1. Login Service Owner Console, and you will see the list of your services.
  2. Click Edit button of a service for which you are going to provide a developer authentication callback endpoint.
  3. Click “Developer Authentication” tab and you will find “Callback” at the top.
  4. Input values for the configuration parameters properly.
  5. Click “Update” button to save the changes.

5. Developer Authentication Callback Request

A request from Authlete to a developer authentication callback endpoint follows the specification described below.

HTTP method

POST method

Content-Type

application/json

Basic Authentication

If you set non-empty values to “Developer Authentication Callback API Key” and “Developer Authentication Callback API Secret” of the service using Service Owner Console, requests from Authlete contain Authorization header for Basic Authentication.

Data Format

The entity body of a developer authentication callback request is JSON. The JSON contains the properties listed in the table below (DeveloperAuthenticationCallbackRequest.java in authlete-java-common is always the latest format). Probably, the number of properties is much larger than you guessed. However, if you don’t have a mind to support social login at the login form of Developer Console, properties you have to care about are just id and password. (Social login for Developer Console is not supported yet.)

6. Developer Authentication Callback Response

A developer authentication callback endpoint is required to return a response that complies with the requirements described below.

Content-Type

application/json; charset=UTF-8 Cache-Control: no-store Pragma: no-cache

Data Format

The entity body of a developer authentication callback response must be JSON. The properties expected to be contained in the JSON are listed in the table below (DeveloperAuthenticationCallbackResponse.java in authlete-java-common is always the latest format).

7. Sample Implementation

TBW