solution10 / auth Goto Github PK
View Code? Open in Web Editor NEWPowerful and extremely flexible authentication for any PHP framework or application.
License: MIT License
Powerful and extremely flexible authentication for any PHP framework or application.
License: MIT License
The method requests a list of all packages for a user and get an array of the package names. Those are then passed to the Collection for sorting. The problem here is that the Collection is supposed to sort by the package precedence, which it has no access to! Also, there is no way to get the precedence or permissions just from a package's name. I suggest to remove the package names completely and instead use their class names. This way we can initialize the needed package objects when needed and the system stays decentralized.
Tests are only useful during the development stage. Their namespaces shouldn't pollute the autoloader in production.
The method hasPackage() as used in the last example of the Managing the packages on a user section does not exist in the Auth class. I'd love to open a pull request with a fix, but I'd need to know if this is a mistake in the docs or simply a missing method.
The Auth::hashPassword method is using a hard coded PASSWORD_BCRYPT when calling password_hash. While the current versions of password_hash (5.5 thru 7.1) only support two valid values PASSWORD_DEFAULT and PASSWORD_BCRYPT, and they both have the same value, this is not an issue. Hopefully this will change in PHP 7.2 with the stronger cryptography being added. The php.net site indicates that PASSWORD_DEFAULT 'may' change with stronger cryptography, thus it should be the stronger/secure algorithm. I would suggest adding the 'algo' argument to $options as the 'cost' is. I can work on a pull request if you would like.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.