public class FederationRegistrationResponse extends ApiResponse
/federation/registration
API.
Authlete's /federation/registration
API returns JSON which can
be mapped to this class. The authorization server implementation should
retrieve the value of the
response parameter from the API response and take the following steps
according to the value.
action
OK
When the value of the
response
parameter is action
, it means that the client
registration request was processed successfully and a client was registered.
OK
In this case, the implementation of the federation registration endpoint of the authorization server should return an HTTP response to the API caller with the HTTP status code "
200 OK
" and the content type
"application/entity-statement+jwt
". The message body (= an entity
statement in the the JWT format) of the response has been prepared by Authlete's
/federation/registration
API and it is available as the
responseContent
response parameter.
The implementation of the federation registration 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)
BAD_REQUEST
When the value of the
response
parameter is action
, it means
that the client registration request is wrong or that a client having the
same entity ID has already been registered.
BAD_REQUEST
400 Bad Request
" 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/registration
API and it is available as the
responseContent
response parameter.
The implementation of the federation registration endpoint can construct an HTTP response by doing like below.
400 Bad Request
Content-Type: application/json
(Other HTTP headers)
(the value of the responseContent
response parameter)
NOT_FOUND
When the value of the
response
parameter is action
, it means that
the service configuration has not enabled the feature of OpenID Connect
Federation 1.0 and so the federation registration endpoint should not be
accessed.
NOT_FOUND
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/registration
API and it is available as the
responseContent
response parameter.
The implementation of the federation registration 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
When the value of the
response
parameter is action
,
it means that an unexpected error has occurred on Authlete side or the
service has not been set up properly yet. For example, when a JWK Set
for federation (INTERNAL_SERVER_ERROR
Service.
) has not been set up, when authority hints
(federationJwks
Service.
) have not been set up, etc.
authorityHints
500 Internal Server Error
" 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/registration
API and it is available as the
responseContent
response parameter.
Such a simple implementation of the entity configuration endpoint can construct an HTTP response by doing like below.
500 Internal Server Error
Content-Type: application/json
(Other HTTP headers)
(the value of the responseContent
response parameter)
However, in real commercial deployments, it is rare for an authorization
server to return "500 Internal Server Error
" when it encounters
an unexpected internal error. It's up to implementations of authorization
servers what they actually return to API callers in the case of internal
server error.
Modifier and Type | Class and Description |
---|---|
static class |
FederationRegistrationResponse.Action
The next action that the implementation of the federation
registration endpoint should take.
|
Constructor and Description |
---|
FederationRegistrationResponse() |
Modifier and Type | Method and Description |
---|---|
FederationRegistrationResponse.Action |
getAction()
Get the next action that the implementation of the federation
registration endpoint should take.
|
Client |
getClient()
Get the information about the client that has been registered by the
client registration request.
|
String |
getResponseContent()
Get the content that the implementation of the federation registration
endpoint should use when it constructs a response to the API caller.
|
FederationRegistrationResponse |
setAction(FederationRegistrationResponse.Action action)
Set the next action that the implementation of the federation
registration endpoint should take.
|
FederationRegistrationResponse |
setClient(Client client)
Set the information about the client that has been registered by the
client registration request.
|
FederationRegistrationResponse |
setResponseContent(String responseContent)
Set the content that the implementation of the federation registration
endpoint should use when it constructs a response to the API caller.
|
getResultCode, getResultMessage, setResultCode, setResultMessage
public FederationRegistrationResponse.Action getAction()
public FederationRegistrationResponse setAction(FederationRegistrationResponse.Action action)
action
- The next action.this
object.public String getResponseContent()
The format of the content varies depending on the value of the
action
response parameter.
public FederationRegistrationResponse setResponseContent(String responseContent)
The format of the content varies depending on the value of the
action
response parameter.
responseContent
- The content that should be returned from the federation
registration endpoint.this
object.public Client getClient()
public FederationRegistrationResponse setClient(Client client)
client
- The information about the registered client.this
object.Copyright © 2023. All rights reserved.