mezzio / mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.
https://docs.mezzio.dev/mezzio-authentication-oauth2/
BSD 3-Clause "New" or "Revised" License
25 stars 17 forks source link

Client name and client identifier are differents #10

Open weierophinney opened 4 years ago

weierophinney commented 4 years ago

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

Danielss89 commented 3 years ago

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 commented 3 years ago

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