Skip to content

Commit

Permalink
Added doc for email authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
lolautruche committed Jul 13, 2018
1 parent f44cbf2 commit 969b0b9
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
19 changes: 17 additions & 2 deletions README.md
Expand Up @@ -55,10 +55,23 @@ Adds extra features to eZ Platform.

Simplifies calls to `$this->isGranted()` from inside controllers and `is_granted()` from within templates when checking
against eZ inner permission system (module/function/valueObject).

* **[Authentication by e-mail](Resources/doc/email_authentication.md)**

By activating `enable_email_authentication` flag, it will be possible for users to authenticate using their e-mail,
in addition to their username.

```yaml
ez_core_extra:
system:
my_siteaccess:
enable_email_authentication: true
```

## Requirements
EzCoreExtraBundle currently works with **eZ Publish 5.4/2014.11** (and *should work* with Netgen variant)
and eZ Platform (kernel version >=6.0).
EzCoreExtraBundle currently works eZ Platform v1 and v2 (kernel v6 and v7).

> If you're using eZ publish 5.4/2014.11 or Netgen variant, look at `1.1` branch and/or `v1.x` releases.
## Installation
This bundle is available on [Packagist](https://packagist.org/packages/lolautruche/ez-core-extra-bundle).
Expand All @@ -70,6 +83,8 @@ composer require lolautruche/ez-core-extra-bundle

Then add it to your application:

> `EzCoreExtraBundle` **MUST** be instanciated **AFTER** eZ bundles.
```php
// ezpublish/EzPublishKernel.php

Expand Down
1 change: 1 addition & 0 deletions Resources/doc/README.md
Expand Up @@ -4,3 +4,4 @@
- [Template variables injection using **ExpressionLanguage**](view_parameters_expressions.md)
- [View parameters providers (dynamic variables injection)](view_parameters_providers.md)
- [Simplified authorization checks](simplified_auth_checks.md)
- [Authentication by e-mail](email_authentication.md)
22 changes: 22 additions & 0 deletions Resources/doc/email_authentication.md
@@ -0,0 +1,22 @@
# Authentication by e-mail

By default, eZ users can only authenticate using their username. However, using e-mail for authentication is quite a
common use case.

EzCoreExtraBundle enables the possibility for any eZ user to authenticate against their e-mail, in addition to their username.

You can easily activate it for your SiteAccess using the following config, where `my_siteaccess` is the name of
your SiteAccess or SiteAccess group:

```yaml
ez_core_extra:
system:
my_siteaccess:
enable_email_authentication: true
```

Original behavior - authentication by username - is kept and will always have precedence (e.g. username will always
be tested first).

> **Important note**: `EzCoreExtraBundle` **MUST** be instanciated
> **after eZ bundles** in `AppKernel`.

0 comments on commit 969b0b9

Please sign in to comment.