Skip to main content
POST
/
api
/
{serviceId}
/
federation
/
configuration
Typescript (SDK)
import { Authlete } from "@authlete/typescript-sdk";

const authlete = new Authlete({
  bearer: process.env["AUTHLETE_BEARER"] ?? "",
});

async function run() {
  const result = await authlete.federation.configuration({
    serviceId: "<id>",
  });

  console.log(result);
}

run();
{
  "resultCode": "<string>",
  "resultMessage": "<string>",
  "action": "OK",
  "responseContent": "<string>"
}

OK

When the value of the action response parameter is OK, it means that Authlete could prepare an entity configuration successfully. In this case, the implementation of the entity configuration endpoint of the authorization server should return an HTTP response to the client application with the HTTP status code “200 OK” and the content type “application/entity-statement+jwt”. The message body (= an entity configuration in the JWT format) of the response has been prepared by Authlete’s /federation/configuration API and it is available as the responseContent response parameter. The implementation of the entity configuration endpoint can construct an HTTP response by doing like below.
200 OK
Content-Type: application/entity-statement+jwt
(Other HTTP headers)
(the value of the responseContent response parameter)

NOT_FOUND

When the value of the action response parameter is NOT_FOUND, it means that the service configuration has not enabled the feature of OpenID Connect Federation 1.0 and so the client application should have not access the entity configuration endpoint. In this case, the implementation of the entity configuration endpoint of the authorization server should return an HTTP response to the client application with the HTTP status code “404 Not Found” and the content type “application/json”. The message body (= error information in the JSON format) of the response has been prepared by Authlete’s /federation/configuration API and it is available as the responseContent response parameter. The implementation of the entity configuration endpoint can construct an HTTP response by doing like below.
404 Not Found
Content-Type: application/json
(Other HTTP headers)
(the value of the responseContent response parameter)

INTERNAL_SERVER_ERROR

could prepare an entity configuration successfully. In this case, the implementation of the entity configuration endpoint of the authorization server should return an HTTP response to the client application with the HTTP status code “200 OK” and the content type “application/entity-statement+jwt”. The message body (= an entity configuration in the JWT format) of the response has been prepared by Authlete’s /federation/configuration API and it is available as the responseContent response parameter. The implementation of the entity configuration endpoint can construct an HTTP response by doing like below.
200 OK
Content-Type: application/entity-statement+jwt
(Other HTTP headers)
(the value of the responseContent response parameter)

Authorizations

Authorization
string
header
required

Authenticate every request with a Service Access Token or Organization Token. Set the token value in the Authorization: Bearer <token> header.

Service Access Token: Scoped to a single service. Use when automating service-level configuration or runtime flows.

Organization Token: Scoped to the organization; inherits permissions across services. Use for org-wide automation or when managing multiple services programmatically.

Both token types are issued by the Authlete console or provisioning APIs.

Path Parameters

serviceId
string
required

A service ID.

Body

application/json

The body is of type object.

Response

Federation configuration retrieved successfully

resultCode
string

The code which represents the result of the API call.

resultMessage
string

A short message which explains the result of the API call.

action
enum<string>

The next action that the authorization server implementation should take.

Available options:
OK,
NOT_FOUND,
INTERNAL_SERVER_ERROR
responseContent
string

The content that the authorization server implementation is to return to the client application. Its format varies depending on the value of action parameter.