Server IP : 23.254.227.96 / Your IP : 216.73.216.7 Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64 User : viralblo ( 1001) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/local/cwpsrv/var/services/oauth/v2/server/OAuth2/Storage/ |
Upload File : |
<?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); /** * @param string $username - username to get details for * @return array|false - 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); }