Authentication and authorisation in Vapor 3 is very easy with Vapor's auth library. You simply add the library into your project and use one of the middlewares to authorize users. Unfortunately this is not as easy to do when your route allows WebSocket connections.