Use central error method
[indieauth-openid.git] / www / index.php
index cb698454c0e88bdbfe7932bc705e9ccb013b95ed..ca89855e6f1a1aff899e8e16dd8e1faf228d7319 100644 (file)
@@ -246,9 +246,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'GET') {
 
     $me = validate_token($token, $redirect_uri, $client_id, $state);
     if ($me === false) {
 
     $me = validate_token($token, $redirect_uri, $client_id, $state);
     if ($me === false) {
-        header('HTTP/1.0 400 Bad Request');
-        echo "Validating token failed\n";
-        exit(1);
+        error('Validating token failed');
     }
     header('Content-type: application/x-www-form-urlencoded');
     echo 'me=' . urlencode($me);
     }
     header('Content-type: application/x-www-form-urlencoded');
     echo 'me=' . urlencode($me);