Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into cake4
Browse files Browse the repository at this point in the history
# Conflicts:
#	.travis.yml
#	composer.json
  • Loading branch information
dereuromark committed Dec 27, 2019
2 parents f356b0b + c29f6b2 commit bafd3f6
Show file tree
Hide file tree
Showing 26 changed files with 29 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ language: php

php:
- 7.2
- 7.3
- 7.4snapshot
- 7.4

env:
matrix:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"require": {
"php": ">=7.2",
"cakephp/cakephp": "4.x-dev"
"cakephp/cakephp": "^4.0"
},
"require-dev": {
"cakephp/debug_kit": "4.x-dev",
Expand Down Expand Up @@ -46,7 +46,7 @@
"test-setup": "[ ! -f phpunit.phar ] && wget https://phar.phpunit.de/phpunit-8.4.3.phar && mv phpunit-8.4.3.phar phpunit.phar || true",
"test-coverage" : "php phpunit.phar --log-junit tmp/coverage/unitreport.xml --coverage-html tmp/coverage --coverage-clover tmp/coverage/coverage.xml",
"phpstan": "phpstan analyse -c tests/phpstan.neon -l 6 src/",
"phpstan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan-shim && mv composer.backup composer.json",
"phpstan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.11 && mv composer.backup composer.json",
"cs-check": "phpcs -p --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml --ignore=/tests/test_files/,/config/Migrations/ --extensions=php src/ tests/",
"cs-fix": "phpcbf -p --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml --ignore=/tests/test_files/,/config/Migrations/ --extensions=php src/ tests/",
"lowest": "validate-prefer-lowest",
Expand Down
3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ You can also clear the cache from code using `TinyAuth\Utility\Cache::clear()` m
You can easily switch out the INI file adapters for both using `allowAdapter` and `aclAdapter` config.
This way you can also read from DB or provide any other API driven backend to read the data from for your authentication or authorization.

Current customizations:
- [TinyAuthBackend plugin](https://github.com/dereuromark/cakephp-tinyauth-backend) as backend GUI for "allow" and "ACL".

## Troubleshooting
First of all: Isolate the issue. Never mix **authentication** and **authorization** (read the top part again).

Expand Down
1 change: 1 addition & 0 deletions src/Auth/AclTrait.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Auth;

use Cake\Core\Configure;
Expand Down
1 change: 1 addition & 0 deletions src/Auth/AllowTrait.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Auth;

use Cake\Core\Configure;
Expand Down
1 change: 1 addition & 0 deletions src/Auth/TinyAuthorize.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Auth;

use Cake\Auth\BaseAuthorize;
Expand Down
1 change: 1 addition & 0 deletions src/Plugin.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth;

use Cake\Core\BasePlugin;
Expand Down
1 change: 1 addition & 0 deletions src/Policy/RequestPolicy.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Policy;

use Authorization\IdentityInterface;
Expand Down
1 change: 1 addition & 0 deletions src/Utility/TinyAuth.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Utility;

use Cake\Core\InstanceConfigTrait;
Expand Down
1 change: 1 addition & 0 deletions src/Utility/Utility.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Utility;

use Cake\Core\Exception\Exception;
Expand Down
1 change: 1 addition & 0 deletions tests/Fixture/DatabaseRolesFixture.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;
Expand Down
1 change: 1 addition & 0 deletions tests/Fixture/DatabaseRolesUsersFixture.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;
Expand Down
1 change: 1 addition & 0 deletions tests/Fixture/DatabaseUserRolesFixture.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;
Expand Down
1 change: 1 addition & 0 deletions tests/Fixture/EmptyRolesFixture.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;
Expand Down
1 change: 1 addition & 0 deletions tests/Fixture/RolesUsersFixture.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;
Expand Down
1 change: 1 addition & 0 deletions tests/Fixture/UsersFixture.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;
Expand Down
1 change: 1 addition & 0 deletions tests/TestCase/Auth/AclAdapter/IniAclAdapterTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Test\Auth\AclAdapter;

use Cake\Core\Plugin;
Expand Down
1 change: 1 addition & 0 deletions tests/TestCase/Auth/AllowAdapter/IniAllowAdapterTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Test\Auth\AllowAdapter;

use Cake\Core\Plugin;
Expand Down
1 change: 1 addition & 0 deletions tests/TestCase/Auth/TinyAuthorizeTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Test\Auth;

use Cake\Controller\ComponentRegistry;
Expand Down
1 change: 1 addition & 0 deletions tests/TestCase/Command/TinyAuthSyncCommandTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Test\TestCase\Command;

use Cake\Console\Command;
Expand Down
1 change: 1 addition & 0 deletions tests/TestCase/View/Helper/AuthenticationHelperTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TinyAuth\Test\TestCase\View\Helper;

use Cake\Core\Plugin;
Expand Down
1 change: 1 addition & 0 deletions tests/test_app/Auth/TestTinyAuthorize.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TestApp\Auth;

use Cake\Core\Plugin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TestApp\Controller\Admin\MyPrefix;

use Cake\Controller\Controller;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TestApp\Controller\Component;

use Cake\Core\Plugin;
Expand Down
1 change: 1 addition & 0 deletions tests/test_app/Controller/OffersController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TestApp\Controller;

use Cake\Controller\Controller;
Expand Down
1 change: 1 addition & 0 deletions tests/test_app/View/AppView.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace TestApp\View;

use Cake\View\View;
Expand Down

0 comments on commit bafd3f6

Please sign in to comment.