Swagger security

New mechanism to invoke security handlers and communicate authorization errors to the client.