oauth2-server-bundle icon indicating copy to clipboard operation
oauth2-server-bundle copied to clipboard

user_id is not passed in ClientCredentials

Open RuslanZavacky opened this issue 8 years ago • 1 comments

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 avatar Dec 23 '16 20:12 RuslanZavacky

@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.

bshaffer avatar Jan 09 '17 19:01 bshaffer