In a number of places, AM tries to work out what the external representation of the AM host is. Previously it tried to do this based solely on the incoming request, but sometimes that is not sufficient.
A new provider service is created that allows the realm to have a configured option for how to obtain the base URL (including protocol) for places that need to return a URL to the client. The provider will have:
- A radio button option for selecting URL source from:
- Configured value
- RFC7239 Forwarded header
- X-Forwarded-Host + X-Forwarded-Proto headers
- Host and protocol from the incoming AM request
- An extension point that returns a base URL from a given HttpServletRequest.
- A tick box to include/exclude the container's context path
- A text field for specifying the configured fixed value (if required).
- A text field for specifying the extension class (if required).
This service is used to provide the URL base that is used in the well-known endpoints (OIDC and UMA). It needs to be documented so that users understand how to use it.