Customizing a configuration endpoint response
About this task
You can customize the PingFederate openid-configuration.template.json
template to configure both OpenID Connect (OIDC) discovery and OAuth authorization server metadata endpoints. To suit multiple use cases simultaneously, you can customize the amount of configuration information and add conditional statements to return different responses, based on information from the requests.
Customizing the OpenID Provider configuration endpoint response
The OpenID Provider (OP) configuration endpoint at /.well-known/openid-configuration
provides configuration information for the OAuth clients to interface with PingFederate using the OIDC protocol.
Steps
-
Edit the
<pf_install>/pingfederate/server/default/conf/template/openid-configuration.template.json
file to specify the desired information to be returned by the OAuth metadata configuration endpoint.Multiple samples are provided, including sample statements using the
$HttpServletRequest
and$HttpServletResponse
objects to get and set values. -
Save your changes.
Template customization doesn’t require a restart of PingFederate.
For a clustered PingFederate environment, repeat these steps on each node.
Customizing the OAuth authorization server metadata endpoint response
The OAuth authorization server metadata endpoint at /.well-known/oauth-authorization-server
provides configuration information for the OAuth clients to interface with PingFederate using the OAuth 2.0 protocol.
Steps
-
Edit the
<pf_install>/pingfederate/server/default/conf/template/openid-configuration.template.json
file to specify the desired information to be returned by the OAuth metadata configuration endpoint.Multiple samples are provided, including sample statements using the
$HttpServletRequest
and$HttpServletResponse
objects to get and set values. -
Save your changes.
Template customization doesn’t require a restart of PingFederate.
For a clustered PingFederate environment, repeat these steps on each node.
Related links
-
HttpServletRequest in the Java EE 8 Specification APIs documentation.
-
HttpServletResponse in the Java EE 8 Specification APIs documentation.