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 Authentication 4.x API

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

Namespaces

  • Authentication
    • Authenticator
    • Controller
    • Identifier
    • Middleware
    • PasswordHasher
    • UrlChecker
    • View

Namespace Authenticator

Interfaces

  • AuthenticatorInterface
  • ImpersonationInterface
  • PersistenceInterface
  • ResultInterface
  • StatelessInterface

    Interface to mark an authenticator as being stateless and able to emit a challenge exception when authentication fails.

Classes

  • AbstractAuthenticator
  • AuthenticationRequiredException

    An exception for stateless authenticators when credentials are wrong/missing.

    Unlike UnauthenticatedException this class can carry authentication challenge headers. and is used by stateless authenticators.

  • AuthenticatorCollection
  • CookieAuthenticator

    Cookie Authenticator

    Authenticates an identity based on a cookie data.

    You must enable encrypted cookies with EncryptedCookieMiddleware before using CookieAuthenticator. Without encryption remember-me cookie values can be tampered with.

  • EnvironmentAuthenticator

    Environment Authenticator

    Authenticates an identity based on the POST data of the request.

  • FormAuthenticator

    Form Authenticator

    Authenticates an identity based on the POST data of the request.

  • HttpBasicAuthenticator

    HttpBasic Authenticator

    Provides Basic HTTP authentication support.

  • HttpDigestAuthenticator

    HttpDigest Authenticator

    Provides Digest HTTP authentication support.

    Generating passwords compatible with Digest authentication.

    DigestAuthenticate requires a special password hash that conforms to RFC2617. You can generate this password using HttpDigestAuthenticate::password()

    $digestPass = HttpDigestAuthenticator::password($username, $password, env('SERVER_NAME'));

    If you wish to use digest authentication alongside other authentication methods, it's recommended that you store the digest authentication separately. For example User.digest_pass could be used for a digest password, while User.password would store the password hash for use with other methods like BasicHttp or Form.

  • JwtAuthenticator
  • MissingIdentifierException

    Thrown when an authenticator is asked for its identifier but none was configured (and none could be created lazily).

    Extends RuntimeException for backwards compatibility with existing catch blocks; it lets callers distinguish the "no identifier available" case from other runtime failures such as an invalid identifier configuration.

  • PrimaryKeySessionAuthenticator

    Session Authenticator with only ID

    This authenticator stores only the user's primary key in the session, and looks up the full user record from the database on each request.

    By default, it uses a TokenIdentifier configured to look up users by their id field. This works out of the box for most applications:

    $service->loadAuthenticator('Authentication.PrimaryKeySession');

    You can customize the identifier configuration if needed:

    $service->loadAuthenticator('Authentication.PrimaryKeySession', [
        'identifier' => [
            'className' => 'Authentication.Token',
            'tokenField' => 'uuid',
            'dataField' => 'key',
            'resolver' => [
                'className' => 'Authentication.Orm',
                'userModel' => 'Members',
            ],
        ],
    ]);
  • Result

    Authentication result object

  • SessionAuthenticator

    Session Authenticator

  • TokenAuthenticator

    Token Authenticator

    Authenticates an identity based on a token in a query param or the header.

  • UnauthenticatedException

    An exception that signals that authentication was required but missing.

    This class cannot carry authentication challenge headers. This exception uses the 401 status code by default as this exception is used when the application has rejected a request but we do not know which authenticator the user should try.

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