summaryrefslogtreecommitdiffstats
path: root/library/Icinga/Authentication/Authenticatable.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Icinga/Authentication/Authenticatable.php')
-rw-r--r--library/Icinga/Authentication/Authenticatable.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/library/Icinga/Authentication/Authenticatable.php b/library/Icinga/Authentication/Authenticatable.php
new file mode 100644
index 0000000..c10d6d3
--- /dev/null
+++ b/library/Icinga/Authentication/Authenticatable.php
@@ -0,0 +1,21 @@
+<?php
+/* Icinga Web 2 | (c) 2015 Icinga Development Team | GPLv2+ */
+
+namespace Icinga\Authentication;
+
+use Icinga\User;
+
+interface Authenticatable
+{
+ /**
+ * Authenticate a user
+ *
+ * @param User $user
+ * @param string $password
+ *
+ * @return bool
+ *
+ * @throws \Icinga\Exception\AuthenticationException If authentication errors
+ */
+ public function authenticate(User $user, $password);
+}