Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ogizanagi/encodpwd-command-bundle

[DEPRECATED] Use the native Symfony SecurityBundle UserPasswordEncoderCommand instead.
https://github.com/ogizanagi/encodpwd-command-bundle

Last synced: 27 days ago
JSON representation

[DEPRECATED] Use the native Symfony SecurityBundle UserPasswordEncoderCommand instead.

Awesome Lists containing this project

README

        

# Encod Password Command Bundle

## Description

Provides a simple command to get encoded password following the security configured encoders.

## Installation

Add the following dependency to your composer.json file:

``` json
{
"require": {
"_other_packages": "...",
"ogizanagi/encodpwd-command-bundle": "dev-master"
}
}

```

Run composer update for this package, and add the following lines to your `AppKernel.php`:

``` php
Arguments:
- password Password to encode.
Options:
- --salt (-sa) User salt.
- --user-class (-uc) The user class for which we want to generate password. (default: "Symfony\\Component\\Security\\Core\\User\\User")

Example for à `FOS\UserBundle\Model\UserInterface` user :
```
php bin/console ogi:pwd_encode p@ssw0rd --salt s@lt --user-class "FOS\UserBundle\Model\UserInterface"
Encoding password...
Your encoded password: a+1+g+m/ZK6G/tzE8C5ZRu7n/RM=
```

## Improvements

The following improvements could be made:

- Improve errors handling.
- Allow to generate a password for a given user and update it in database and/or in configuration for in_memory users ?
- Interactive prompt to chose an user class & co.
- Any other suggested improvements.