title: How to authenticate a Phoenix socket using Pow?
body: <p>As far as I can tell, the only means for authenticating a user from their session is using Pow.Plug.authenticate_user/2, but this takes a Plug.Conn, not a socket. I want my user_socket.ex file to authenticate connections in the usual way in the connect/3 function generated by Phoenix, but I'm not sure how to do this with Pow.</p>
  
  <p>I understand authentication is usually done in connect/3 using Phoenix.Tokens, but my session already contains a token created via the PowPersistentSession extension, and apparently it is unsafe to access the session in websockets anyway, due to cross origin attacks.</p>
  
  <p>I'm <strong>not</strong> asking how I can access the session in a channel; I'm asking <strong>how I can authenticate a socket using Pow</strong>. </p>