oidc-wp / openid-connect-generic

WordPress plugin to provide an OpenID Connect Generic client
https://wordpress.org/plugins/daggerhart-openid-connect-generic/
260 stars 156 forks source link

token request host header should include port number #538

Open stormrider550 opened 4 months ago

stormrider550 commented 4 months ago

The token request host header should include the port number in the same way it is handled on the userinfo request. This is causing token validation to fail on my auth server when running on a non-standard port because the host without the port is not in my list of valid issuers.

add the following to request_authentication_token() just like is done in request_userinfo()

if ( ! empty( $parsed_url['port'] ) ) { $host .= ":{$parsed_url['port']}"; }