Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/ogizanagi/encodpwd-command-bundle
- Owner: ogizanagi
- Created: 2014-10-13T10:44:23.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-18T10:58:05.000Z (about 10 years ago)
- Last Synced: 2024-10-19T17:32:44.938Z (3 months ago)
- Language: PHP
- Homepage:
- Size: 211 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.