aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/UserCredentialsInterface.php
diff options
context:
space:
mode:
authorKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-03-20 00:34:20 +0100
committerKlaus Weidenbach <Klaus.Weidenbach@gmx.net>2017-03-20 00:43:09 +0100
commit8b4b1350369714a832588c74df3f261b538ec566 (patch)
tree5aca6c06d787bea810dfe0c4736834109fa67e09 /vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/UserCredentialsInterface.php
parentd2c971eda99fadb7515fb1e1ea4bd645a52513bd (diff)
downloadvolse-hubzilla-8b4b1350369714a832588c74df3f261b538ec566.tar.gz
volse-hubzilla-8b4b1350369714a832588c74df3f261b538ec566.tar.bz2
volse-hubzilla-8b4b1350369714a832588c74df3f261b538ec566.zip
:arrow_up: Update bshaffer/oauth2-server-php library.
Manage oauth2-server-php library with composer. Folder ./library/oauth2/ can be removed and includes removed with autoloading.
Diffstat (limited to 'vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/UserCredentialsInterface.php')
-rw-r--r--vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/UserCredentialsInterface.php52
1 files changed, 52 insertions, 0 deletions
diff --git a/vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/UserCredentialsInterface.php b/vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/UserCredentialsInterface.php
new file mode 100644
index 000000000..6e0fd7bad
--- /dev/null
+++ b/vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/UserCredentialsInterface.php
@@ -0,0 +1,52 @@
+<?php
+
+namespace OAuth2\Storage;
+
+/**
+ * Implement this interface to specify where the OAuth2 Server
+ * should retrieve user credentials for the
+ * "Resource Owner Password Credentials" grant type
+ *
+ * @author Brent Shaffer <bshafs at gmail dot com>
+ */
+interface UserCredentialsInterface
+{
+ /**
+ * Grant access tokens for basic user credentials.
+ *
+ * Check the supplied username and password for validity.
+ *
+ * You can also use the $client_id param to do any checks required based
+ * on a client, if you need that.
+ *
+ * Required for OAuth2::GRANT_TYPE_USER_CREDENTIALS.
+ *
+ * @param $username
+ * Username to be check with.
+ * @param $password
+ * Password to be check with.
+ *
+ * @return
+ * TRUE if the username and password are valid, and FALSE if it isn't.
+ * Moreover, if the username and password are valid, and you want to
+ *
+ * @see http://tools.ietf.org/html/rfc6749#section-4.3
+ *
+ * @ingroup oauth2_section_4
+ */
+ public function checkUserCredentials($username, $password);
+
+ /**
+ * @return
+ * ARRAY the associated "user_id" and optional "scope" values
+ * This function MUST return FALSE if the requested user does not exist or is
+ * invalid. "scope" is a space-separated list of restricted scopes.
+ * @code
+ * return array(
+ * "user_id" => USER_ID, // REQUIRED user_id to be stored with the authorization code or access token
+ * "scope" => SCOPE // OPTIONAL space-separated list of restricted scopes
+ * );
+ * @endcode
+ */
+ public function getUserDetails($username);
+}