mezzio-authentication-oauth2 icon indicating copy to clipboard operation
mezzio-authentication-oauth2 copied to clipboard

Client name and client identifier are differents

Open weierophinney opened this issue 5 years ago • 2 comments

In (ClientEntity, ClientRepository, ClientTrait, entityTrait) The code treats clientIdentifier === clientName,

OR , in "League\OAuth2\Server\Entities\ClientEntityInterface" , clientIdentifier and clientName are two different fields.

why not to seperate them as ligue-oauth2 do ?

what is the interest? can you answer me please?, Maybe you have things to be planned.


Originally posted by @samiboukadida at https://github.com/zendframework/zend-expressive-authentication-oauth2/issues/7

weierophinney avatar Dec 31 '19 20:12 weierophinney

Regarding the client identifier, there is a bit of a mixup. The client identifier in the league oauth package is a string name, and this is persisted in this mezzio package as client_name. But ths mezzio package also has a client_id, which is where the mixup happens. In theory, the client_id should be a varchar 100(in all the tables), and the repository should be changed to find the client from the client_id and not client_name(which should not be the unique identifier here). I can do a PR with this change, if the solution is agreeable by the maintainers(I'm not sure who this is, @Ocramius @weierophinney ?).

Danielss89 avatar Apr 15 '21 06:04 Danielss89

@froschdesign I just saw you merging another commit, so pinging you here too. See above comment :)

Danielss89 avatar Apr 15 '21 07:04 Danielss89