wp-kit / hashing
A wp-kit component that handles password hashing
Installs: 7 449
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=7.2
- illuminate/support: ^6.0
This package is not auto-updated.
Last update: 2024-09-07 20:26:52 UTC
README
This is a wp-kit component that handles password hashing.
This component was built to run within an Illuminate\Container\Container
so is perfect for frameworks such as Themosis
, Assely
and wp-kit/theme
.
wp-kit/hashing
was built to support wp-kit/auth
when authenticating users and comparing the input password against the stored password in WordPress.
There are many good reasons to use Eloquent
but often password hashing on users can get in the way of using Eloquent
to manage authentication in WordPress, and wp-kit/hashing
aims to solve this problem.
Installation
If you're using Themosis
, install via Composer
in the root of your Themosis
installation, otherwise install in your Composer
driven theme folder:
composer require "wp-kit/hashing"
Setup
Add Service Provider
Just register the service provider in the providers config:
//inside theme/resources/config/providers.config.php return [ // WPKit\Hashing\HashingServiceProvider::class ];
Add Facade
If you are using Themosis or another Iluminate
driven framework, you may want to add Facades
, simply add them to your aliases:
//inside themosis-theme/resource/config/theme.config.php 'aliases' => [ // 'Hasher' => WPKit\Hashing\Facades\Hasher::class // ]
Usage
If you are using wp-kit/auth
, hashing will work out of the box as illuminate/auth
listens to the hash binding on the container which is register by HashingServiceProvider
. However you can use the Hasher
elsewhere in your application if you wish:
use WPKit\Hashing\Facades\Hasher; $hashed = Hasher::make('some_password'); $validated = Hasher::check('some_password', $hashed);
Get Involved
To learn more about how to use wp-kit
check out the docs:
Any help is appreciated. The project is open-source and we encourage you to participate. You can contribute to the project in multiple ways by:
- Reporting a bug issue
- Suggesting features
- Sending a pull request with code fix or feature
- Following the project on GitHub
- Sharing the project around your community
For details about contributing to the framework, please check the contribution guide.
Requirements
Wordpress 4+
PHP 5.6+
License
wp-kit/hashing is open-sourced software licensed under the MIT License.