wp-kit/hashing

A wp-kit component that handles password hashing
7,453
Install
composer require wp-kit/hashing
Latest Version:2.0.2
PHP:>=7.2
License:MIT
Last Updated:Jan 31, 2020
Links: GitHub  ·  Packagist
Maintainer: terence1990

wp-kit/hashing

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:

View 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.

Related Packages

sven/super-basic-auth

A lightweight package to add basic authentication to your Laravel app.

2,997 23
mikemclin/laravel-wp-password

Laravel package that checks and creates WordPress password hashes

3,667,582 86
anla/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

10 1
jezzdk/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

761 0
januarsirait/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

821 0