CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (Github)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C Authorization 2.x API

  • Project:
    • Authorization
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 2.x
      • 3.x
      • 2.x

Namespaces

  • Authorization
    • Command
    • Controller
    • Exception
    • Middleware
    • Policy

Interface IdentityInterface

Interface for describing identities that can have authorization checked.

This interface is similar to the interface defined in cakephp/authentication and uses ArrayAccess to expose public properties of the wrapped identity implementation.

Namespace: Authorization

Method Summary

  • applyScope() public

    Apply authorization scope conditions/restrictions.

  • can() public

    Check whether the current identity can perform an action.

  • canResult() public

    Check whether the current identity can perform an action.

  • getOriginalData() public

    Get the decorated identity

Method Detail

applyScope() ¶ public

applyScope(string $action, mixed $resource): mixed

Apply authorization scope conditions/restrictions.

Parameters
string $action

The action/operation being performed.

mixed $resource

The resource being operated on.

Returns
mixed

can() ¶ public

can(string $action, mixed $resource): bool

Check whether the current identity can perform an action.

Parameters
string $action

The action/operation being performed.

mixed $resource

The resource being operated on.

Returns
bool

canResult() ¶ public

canResult(string $action, mixed $resource): Authorization\Policy\ResultInterface

Check whether the current identity can perform an action.

Parameters
string $action

The action/operation being performed.

mixed $resource

The resource being operated on.

Returns
Authorization\Policy\ResultInterface

getOriginalData() ¶ public

getOriginalData(): array|ArrayAccess

Get the decorated identity

If the decorated identity implements getOriginalData() that method should be invoked to expose the original data.

Returns
array|ArrayAccess
OpenHub
Pingping
Linode
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (Github)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs