oauth2-server-bundle
oauth2-server-bundle copied to clipboard
user_id is not passed in ClientCredentials
From what I see in GrantType/ClientCredentials.php
in method getUserId we request $this->clientData['user_id']
.
Going to Storage/ClientCredentials.php
it seems this storage do not return user_id. Also, in oauth_client
table there is no column user_id
.
Then, if we have ability to create custom UserProvider, it means that this provider should be used when retrieving user.
Question is - it is intentional, or it might be implemented or what is the appropriate solution in this case?
@RuslanZavacky Good question. This is marked as optional in ClientInterface. So I think the short answer is this library doesn't support it, and that should be ok (as it's not part of the oauth spec).
However, getClientDetails
should return a null value for user_id
to prevent a PHP warning.