HttpResponseMessage GenerateUnauthorizedError() { // NOTE: // THIS IMPLEMENTATION IS DEMONSTRATION PURPOSES ONLY. // Prepare a value of the WWW-Authenticate header. // Note that the implementation of AuthenticateApiCaller() // requires Basic Authentication. string challenge = "Basic realm=\"/api/introspection\""; // Return "401 Unauthorized". return(ResponseUtility.Unauthorized(challenge)); }