Version 1
[yaffs-website] / web / core / modules / user / src / UserAuthInterface.php
diff --git a/web/core/modules/user/src/UserAuthInterface.php b/web/core/modules/user/src/UserAuthInterface.php
new file mode 100644 (file)
index 0000000..38cffc0
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+namespace Drupal\user;
+
+/**
+ * An interface for validating user authentication credentials.
+ */
+interface UserAuthInterface {
+
+  /**
+   * Validates user authentication credentials.
+   *
+   * @param string $username
+   *   The user name to authenticate.
+   * @param string $password
+   *   A plain-text password, such as trimmed text from form values.
+   * @return int|bool
+   *   The user's uid on success, or FALSE on failure to authenticate.
+   */
+  public function authenticate($username, $password);
+
+}