Skip to content

Releases: dereuromark/cakephp-tinyauth

4.5.1

08 May 01:38
206e4ae
Compare
Choose a tag to compare

Fixes

Removed deprecation usage.

4.5.0

30 Apr 12:08
f3716ee
Compare
Choose a tag to compare

Improvements

  • Added caching capability to PrimaryKeySession authenticator.

When using this caching layer to avoid expensive DB lookups, make sure to manually invalidate that cache every time a user's (session related) data changes using SessionCache wrapper object.

  • Improved ForbiddenCakeRedirectHandler to not redirect for extension routed URLs - those non-HTTP (e.g. JSON/XML/CSV) requests should never redirect and directly respond in the same format.

  • Refactored AuthPanel. It now includes the identity for quick lookup, as well the authenticator responsible for the log in.

4.4.1

21 Apr 17:50
2e19f3d
Compare
Choose a tag to compare

Fixes

Relaxed return type for identity() to also support non-Entity types, e.g. array Identity content.
ArrayAccess is only supported, though, if together with Traversable or Countable.

4.4.0

21 Apr 16:16
49c87cf
Compare
Choose a tag to compare

Improvements

  • Added PrimaryKeySessionAuthenticator until a native adaption becomes available.
  • Added ForbiddenCakeRedirect with an unauthorizedMessage to be set as error flash message.
  • Provide AuthUser::identity() convenience method to access the entity directly, as AuthUser::user() returns array for BC reasons

4.3.1

25 Feb 02:26
beefe4b
Compare
Choose a tag to compare

Improvements

  • More improvements for Authorization plugin support.
  • ForbiddenRedirect handler for more convenient redirect incl flash message

4.3.0

23 Feb 16:41
7a43d21
Compare
Choose a tag to compare

Improvements

Better Auth plugins support:
If you are using Authentication plugin, this now seamlessly works together with it.
You can use the central INI files to control allowed controller actions.
The Auth panel works just as well, also the AuthUser component and helper.

4.2.1

24 Sep 09:28
Compare
Choose a tag to compare

Fixes

  • Removed more deprecations

4.2.0

16 Sep 20:39
Compare
Choose a tag to compare

Improvements

  • Compatibility with CakePHP 5.1+
    Make sure to check your _cake_model_ cache as this one is supposed to be used moving forward.

Fixes

  • Fixed up deprecation notices
  • Don't reload component for DebugKit panel, if already loaded

4.1.0

23 Jan 06:31
Compare
Choose a tag to compare

Improvements

Add any role to any command and action:

bin/cake tiny_auth_add {Controller} {Action} {roles, comma separated}

It will skip if the roles are already present for this controller and action.

Use with -d -v to just output the changes it would do to your ACL INI file.

4.0.1

24 Dec 15:39
Compare
Choose a tag to compare

Fixed

Fixed role reading/detection for role as backed enum.

The following would now work for a string field:

namespace App\Model\Enum;

use Cake\Database\Type\EnumLabelInterface;
use Cake\Utility\Inflector;

enum UserRole: string implements EnumLabelInterface {

    case MAINTAINER = 'maintainer';
    case ADMIN = 'admin';

    /**
     * @return string
     */
    public function label(): string {
        return Inflector::humanize(mb_strtolower($this->name));
    }

}