populateRequest

Internal function to populate an OIDC authorization request with the necessary parameters.

This function handles both standard OAuth2 authorization requests and PAR (Pushed Authorization Request):

Standard Flow:

  • Builds authorization URL with all parameters in the query string

  • Suitable for most OAuth2/OIDC implementations

PAR Flow (RFC 9126):

  • First pushes authorization parameters to the PAR endpoint via POST

  • Receives a request_uri that references the pushed parameters

  • Uses the request_uri in the actual authorization request

  • Provides better security and reduces URL length

Return

The populated request ready for execution

Throws

If PAR request fails when PAR is enabled