Class FederationRegistrationResponse
- java.lang.Object
-
- com.authlete.common.dto.ApiResponse
-
- com.authlete.common.dto.FederationRegistrationResponse
-
- All Implemented Interfaces:
Serializable
public class FederationRegistrationResponse extends ApiResponse
Response from Authlete's/federation/registrationAPI.Authlete's
/federation/registrationAPI returns JSON which can be mapped to this class. The authorization server implementation should retrieve the value of theresponse parameter from the API response and take the following steps according to the value.actionOKWhen the value of the
response parameter isaction, 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/registrationAPI and it is available as theresponse parameter.responseContentThe 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
responseContentresponse parameter)BAD_REQUESTWhen the value of the
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 "response parameter isaction, it means that the client registration request is wrong or that a client having the same entity ID has already been registered.BAD_REQUEST400 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/registrationAPI and it is available as theresponse parameter.responseContentThe 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
responseContentresponse parameter)NOT_FOUNDWhen the value of the
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 "response parameter isaction, it means that the service configuration has not enabled the feature of OpenID Federation 1.0 and so the federation registration endpoint should not be accessed.NOT_FOUND404 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/registrationAPI and it is available as theresponse parameter.responseContentThe 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
responseContentresponse parameter)INTERNAL_SERVER_ERRORWhen the value of the
In this case, a simple implementation of the federation registration endpoint would return an HTTP response to the client application with the HTTP status code "response parameter isaction, 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_ERRORService.) has not been set up, when authority hints (federationJwksService.) have not been set up, etc.authorityHints500 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/registrationAPI and it is available as theresponse parameter.responseContentSuch 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
responseContentresponse 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.- Since:
- 3.45, Authlete 2.3
- See Also:
- OpenID Federation 1.0, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFederationRegistrationResponse.ActionThe next action that the implementation of the federation registration endpoint should take.
-
Constructor Summary
Constructors Constructor Description FederationRegistrationResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FederationRegistrationResponse.ActiongetAction()Get the next action that the implementation of the federation registration endpoint should take.ClientgetClient()Get the information about the client that has been registered by the client registration request.StringgetResponseContent()Get the content that the implementation of the federation registration endpoint should use when it constructs a response to the API caller.FederationRegistrationResponsesetAction(FederationRegistrationResponse.Action action)Set the next action that the implementation of the federation registration endpoint should take.FederationRegistrationResponsesetClient(Client client)Set the information about the client that has been registered by the client registration request.FederationRegistrationResponsesetResponseContent(String responseContent)Set the content that the implementation of the federation registration endpoint should use when it constructs a response to the API caller.-
Methods inherited from class com.authlete.common.dto.ApiResponse
getResponseHeaders, getResultCode, getResultMessage, setResponseHeaders, setResultCode, setResultMessage
-
-
-
-
Method Detail
-
getAction
public FederationRegistrationResponse.Action getAction()
Get the next action that the implementation of the federation registration endpoint should take.- Returns:
- The next action.
-
setAction
public FederationRegistrationResponse setAction(FederationRegistrationResponse.Action action)
Set the next action that the implementation of the federation registration endpoint should take.- Parameters:
action- The next action.- Returns:
thisobject.
-
getResponseContent
public String getResponseContent()
Get the content that the implementation of the federation registration endpoint should use when it constructs a response to the API caller.The format of the content varies depending on the value of the
actionresponse parameter.- Returns:
- The content that should be returned from the federation registration endpoint.
-
setResponseContent
public 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.The format of the content varies depending on the value of the
actionresponse parameter.- Parameters:
responseContent- The content that should be returned from the federation registration endpoint.- Returns:
thisobject.
-
getClient
public Client getClient()
Get the information about the client that has been registered by the client registration request.- Returns:
- The information about the registered client.
-
setClient
public FederationRegistrationResponse setClient(Client client)
Set the information about the client that has been registered by the client registration request.- Parameters:
client- The information about the registered client.- Returns:
thisobject.
-
-