Reverse proxy as OpenIDC RP


I’m looking to try and set up a reverse proxy that - handles the OpenID connect and forwards authenticated requests to an upstream server that upgrades its connection to a web socket connection
Any pointers how I would do this in Echo?
I can see the example for an http proxy, though I’m not clear what to do to make it handle servers that upgrade to a web socket
I’m not clear how to extend the JWT example so it handles the whole openid connect authentication e.g. with Azure as an Identity Provider.
Thanks for any thoughts.