Closed jkingstonc closed 4 years ago
Your password should not be stored in plaintext, and this library does not recognize passwords stored this way. By default the library uses sha1
to store a password, e.g. from your command line:
$ php -r 'echo sha1("somepassword") . "\n";'
This will output f8377c90fcfd699f0ddbdcb30c2c9183d2d933ea
, which if stored in the password
column of your database, will work as you expect.
Hi, I have created a Pdo storage object, a server and a UserCredentials grant type. I have also inserted an entry into the db in the oauth_users schema. However, the server doesn't seem to be able to recognize the user credentials? I can use other grant types but UserCredentials doesn't seem to work?
$storage = new OAuth2\Storage\Pdo(array('dsn' => $database, 'username' => $username, 'password' => $password)); $server = new OAuth2\Server($storage); $server->addGrantType(new OAuth2\GrantType\UserCredentials($storage));
This is my oauth_users table: https://imgur.com/xqZpKD3