Added validation method for handshake request