]> git.defcon.no Git - hermes/blobdiff - api/lib/auth.php
Moved API-files to a separate API directory.
[hermes] / api / lib / auth.php
diff --git a/api/lib/auth.php b/api/lib/auth.php
new file mode 100644 (file)
index 0000000..2f8f9cf
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+function token_auth( )
+{
+       return true;
+}
+
+if (! token_auth() )
+{
+       print json_encode( array( 'response' => 'failed', 'cause' => 'unauthorized', 'description' => 'Not authorized') );
+       exit;
+}
+?>