         let tokenRequest = Request(method: .post, uri: tokenIntrospectionEndpoint)
         var tokenRequestJSON = JSON()
         try tokenRequestJSON.set("token", token)
+        tokenRequest.json = tokenRequestJSON
+        
+        let resourceAuthHeader = "testResource:server".makeBytes().base64Encoded.makeString()
+        tokenRequest.headers[.authorization] = "Basic \(resourceAuthHeader)"
         
         let tokenInfoResponse = try client.respond(to: tokenRequest)
         

        
        
        let fakeTokenString = "123456789ABCDEFHGUIO"
        let protectedRequest = Request(method: .get, uri: "/protected/")
        protectedRequest.headers[.authorization] = "Bearer \(fakeTokenString)"
        let protectedResponse = try resourceDrop.respond(to: protectedRequest)

        
        var authConfig = try Config(arguments: ["vapor", "--env=test"])
        let newClient = OAuthClient(clientID: newClientID, redirectURIs: [redirectURI], clientSecret: clientSecret, validScopes: [scope, scope2], confidential: true, firstParty: true)
        let clientRetriever = StaticClientRetriever(clients: [newClient])
        let fakeUserManager = FakeUserManager()
        let resourceServerRetriever = FakeResourceServerRetriever()
        let oauthProvider = OAuth.Provider(tokenManager: fakeTokenManager, clientRetriever: clientRetriever, authorizeHandler: capturingAuthouriseHandler, userManager: fakeUserManager, validScopes: [scope, scope2], resourceServerRetriever: resourceServerRetriever)
        try authConfig.addProvider(oauthProvider)
        authConfig.addConfigurable(middleware: SessionsMiddleware.init, name: "sessions")
        try authConfig.set("droplet.middleware", ["error", "sessions"])
