agungsugiarto / codeigniter4-authentication

The codeigniter4\authentication component provides an API for authentication and includes concrete authentication adapters for common use case scenarios.
MIT License
49 stars 9 forks source link

Composer Provision #13

Closed MGatner closed 3 years ago

MGatner commented 3 years ago

Hi! I wanted to point out to you, as a maintainer of a CodeIgniter 4 authentication module, that we have added a provides statement to help standardize authentication formats: https://codeigniter4.github.io/CodeIgniter4/extending/authentication.html

It is very loose at this point but even those simple recommendations and corresponding Composer line should help developers a lot.

agungsugiarto commented 3 years ago

Hello @MGatner, thank u for suggestion.

Can i suggest also, to update documentation with link pointing to packagist. example https://packagist.org/providers/codeigniter4/authentication-implementation

agungsugiarto commented 3 years ago

Here we go Screenshot (18)

MGatner commented 3 years ago

Well you added the provision without implementing the requirements, which is quite misleading. Please review the User Guide link, but basically you are missing:

Thank you for the Packagist link suggestion, that's a great idea! I just sent it over (and mentioned you).

One more thing while I'm here... I made some interfaces that my modules will use for identifying user data. The auto-discovery (https://github.com/tattersoftware/codeigniter4-users/blob/develop/src/UserProvider.php) checks for a few known modules and I would like to add yours. I can wrap them in an adapter and provide the methods, unless you would prefer to provide those natively? See UserEntity and UserFactory interfaces.

agungsugiarto commented 3 years ago

16 i hope you're happy @MGatner in this pr is fully provide codeigniter4/authentication-implementation 😄

About you're package codeigniter4-users you can wrap this the entitty reference is from interface https://github.com/agungsugiarto/codeigniter4-authentication/blob/master/src/Contracts/AuthenticatorInterface.php and implementation from https://github.com/agungsugiarto/codeigniter4-authentication/blob/master/src/Traits/AuthenticatableTrait.php

and the user factory from https://github.com/agungsugiarto/codeigniter4-authentication/blob/master/src/Contracts/UserProviderInterface.php implementation https://github.com/agungsugiarto/codeigniter4-authentication/blob/master/src/Traits/UserProviderTrait.php

MGatner commented 3 years ago

Thanks for the info, I will integrate that!

One mistake I noted inline on your PR but otherwise it looks great.

agungsugiarto commented 3 years ago

Thanks for the info, I will integrate that!

One mistake I noted inline on your PR but otherwise it looks great.

thank u, already fix a248d264806b650c2396fefae46e0239b8c8eb40

MGatner commented 3 years ago

I've included your library, using the "Fluent" handle: https://github.com/tattersoftware/codeigniter4-users/commit/a7eba6508c95f6b464613696fb7590549811f7e5

This latest release includes two new extensions to the user interface, HasGroup and HasPermission, for modules that need those additional methods. If you end up implementing these in your library please let me know and I will add the additional interfaces to my wrapper. https://github.com/tattersoftware/codeigniter4-users/tree/develop/src/Interfaces

agungsugiarto commented 3 years ago

Thank u @MGatner, but i don't any have plan to make authorization. Let community make authorization for this package.