From 003a17b85d2698466efb3e2766885cae622ae778 Mon Sep 17 00:00:00 2001 From: KoKsPfLaNzE Date: Sat, 27 Feb 2021 10:00:37 +0100 Subject: [PATCH] Fix link in README.md --- README.md | 11 +++++------ UPGRADE.md | 2 +- composer.json | 3 ++- data/User.php.dist | 2 +- data/User.php.odm.dist | 2 +- docs/doctrine.md | 26 +++++++++++++------------- docs/unauthorized-strategies.md | 2 +- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 0a2bfa5..2a151c7 100644 --- a/README.md +++ b/README.md @@ -45,12 +45,11 @@ php composer.phar require kokspflanze/bjy-authorize ## Configuration -Following steps apply if you want to use `ZfcUser` with `Laminas\Db`. If you want to use Doctrine ORM/ODM, you should -also check the [doctrine documentation](https://github.com/bjyoungblood/BjyAuthorize/blob/master/docs/doctrine.md). +Following steps apply if you want to use `LmcUser` with `Laminas\Db`. If you want to use Doctrine ORM/ODM, you should +also check the [doctrine documentation](https://github.com/kokspflanze/BjyAuthorize/blob/master/docs/doctrine.md). 1. Ensure that following modules are enabled in your `application.config.php` file in the this order: - * `ZfcBase` - * `ZfcUser` + * `LmcUser` * `BjyAuthorize` 3. Import the SQL schema located in `./vendor/BjyAuthorize/data/schema.sql`. 4. Create a `./config/autoload/bjyauthorize.global.php` file and fill it with @@ -70,9 +69,9 @@ return [ /* this module uses a meta-role that inherits from any roles that should * be applied to the active user. the identity provider tells us which * roles the "identity role" should inherit from. - * for ZfcUser, this will be your default identity provider + * for LmcUser, this will be your default identity provider */ - 'identity_provider' => \BjyAuthorize\Provider\Identity\ZfcUserZendDb::class, + 'identity_provider' => \BjyAuthorize\Provider\Identity\LmcUserZendDb::class, /* If you only have a default role and an authenticated role, you can * use the 'AuthenticationIdentityProvider' to allow/restrict access diff --git a/UPGRADE.md b/UPGRADE.md index 625cde6..5d1de71 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -24,7 +24,7 @@ Following changes are required to upgrade: [documentation](https://github.com/bjyoungblood/BjyAuthorize/blob/master/docs/doctrine.md) instead * The `BjyAuthorize\Provider\Identity\AuthenticationDoctrineEntity` provider was removed, use the simpler `BjyAuthorize\Provider\Identity\AuthenticationIdentityProvider` instead - * The `BjyAuthorize\Provider\Identity\ZfcUserDoctrine` provider was removed, use the + * The `BjyAuthorize\Provider\Identity\LmcUserDoctrine` provider was removed, use the simpler `BjyAuthorize\Provider\Identity\AuthenticationIdentityProvider` instead * Following methods were removed from the `BjyAuthorize\Provider\Identity\ProviderInterface`: * `getDefaultRole` diff --git a/composer.json b/composer.json index 7881e26..9b3d634 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,8 @@ }, "suggests": { "laminas/laminas-developer-tools": "if you need to see current authorization details while developing", - "lm-commons/lmc-user": "LmcUser provides a good default setup to get started with bjyauthorize" + "lm-commons/lmc-user": "LmcUser provides a good default setup to get started with bjyauthorize", + "lm-commons/lmc-user-doctrine-orm": "To support Doctrine with LmcUser" }, "autoload": { "psr-4": { diff --git a/data/User.php.dist b/data/User.php.dist index 618a049..ab25ce8 100644 --- a/data/User.php.dist +++ b/data/User.php.dist @@ -11,7 +11,7 @@ namespace MyNamespace; use BjyAuthorize\Provider\Role\ProviderInterface; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; -use ZfcUser\Entity\UserInterface; +use LmcUser\Entity\UserInterface; /** * An example of how to implement a role aware user entity. diff --git a/data/User.php.odm.dist b/data/User.php.odm.dist index 41f2732..c0159e1 100644 --- a/data/User.php.odm.dist +++ b/data/User.php.odm.dist @@ -11,7 +11,7 @@ namespace MyNamespace; use BjyAuthorize\Provider\Role\ProviderInterface; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM; -use ZfcUser\Entity\UserInterface; +use LmcUser\Entity\UserInterface; use MyNamespace\Role; /** diff --git a/docs/doctrine.md b/docs/doctrine.md index 55a65c0..166397a 100644 --- a/docs/doctrine.md +++ b/docs/doctrine.md @@ -4,18 +4,18 @@ If you wish to use Doctrine 2 ORM entities (ORM) or MongoDB ODM Documents (ODM), having your authentication identity implement either `Laminas\Permissions\Acl\Role\RoleInterface` or `BjyAuthorize\Provider\Role\ProviderInterface`. -## BjyAuthorize, ZfcUser and ZfcUserDoctrineORM +## BjyAuthorize, LmcUser and LmcUserDoctrineORM -Here's some simple steps to do this specifically with `ZfcUserDoctrineORM`, though any authentication service +Here's some simple steps to do this specifically with `LmcUserDoctrineORM`, though any authentication service will work too: ### Installation -Install and enable `ZfcUser` and `ZfcUserDoctrineORM`: +Install and enable `LmcUser` and `LmcUserDoctrineORM`: ```sh -php composer.phar require zf-commons/zfc-user-doctrine-orm:0.1.* +php composer.phar require lm-commons/lmc-user-doctrine-orm ``` You will obviously need to enable all the involved modules @@ -23,35 +23,35 @@ You will obviously need to enable all the involved modules ### Implement a `MyNamespace\User` and a `MyNamespace\Role` entities Implement a `MyNamespace\User` and a `MyNamespace\Role` entity. -You can use the [`User.php.dist`](https://github.com/bjyoungblood/BjyAuthorize/blob/master/data/User.php.dist) -and [`Role.php.dist`](https://github.com/bjyoungblood/BjyAuthorize/blob/master/data/Role.php.dist) files as blueprint. +You can use the [`User.php.dist`](https://github.com/kokspflanze/BjyAuthorize/blob/master/data/User.php.dist) +and [`Role.php.dist`](https://github.com/kokspflanze/BjyAuthorize/blob/master/data/Role.php.dist) files as blueprint. ### Configuration -You will need to override the settings of `ZfcUserDoctrineORM` to use the entities you defined: +You will need to override the settings of `LmcUserDoctrineORM` to use the entities you defined: ```php return array( 'doctrine' => array( 'driver' => array( - // overriding zfc-user-doctrine-orm's config - 'zfcuser_entity' => array( + // overriding lmc-user-doctrine-orm's config + 'lmcuser_entity' => array( 'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver', 'paths' => 'path/to/your/entities/dir', ), 'orm_default' => array( 'drivers' => array( - 'MyNamespace' => 'zfcuser_entity', + 'MyNamespace' => 'lmcuser_entity', ), ), ), ), - 'zfcuser' => array( - // telling ZfcUser to use our own class + 'lmcuser' => array( + // telling LmcUser to use our own class 'user_entity_class' => 'MyNamespace\User', - // telling ZfcUserDoctrineORM to skip the entities it defines + // telling LmcUserDoctrineORM to skip the entities it defines 'enable_default_entities' => false, ), diff --git a/docs/unauthorized-strategies.md b/docs/unauthorized-strategies.md index 74cdcbc..fe6d3fa 100644 --- a/docs/unauthorized-strategies.md +++ b/docs/unauthorized-strategies.md @@ -26,7 +26,7 @@ class Module $strategy = new RedirectionStrategy(); - // eventually set the route name (default is ZfcUser's login route) + // eventually set the route name (default is LmcUser's login route) $strategy->setRedirectRoute('my/route/name'); // eventually set the URI to be used for redirects