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 3.x API

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

Namespaces

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

Interface AuthenticationServiceInterface

Namespace: Authentication

Method Summary

  • authenticate() public

    Authenticate the request against the configured authentication adapters.

  • clearIdentity() public

    Clears the identity data

  • getAuthenticationProvider() public

    Gets the successful authenticator instance if one was successful after calling authenticate

  • getIdentity() public

    Gets an identity object or null if identity has not been resolved.

  • getIdentityAttribute() public

    Return the name of the identity attribute.

  • getLoginRedirect() public

    Return the URL that an authenticated user came from or null.

  • getResult() public

    Gets the result of the last authenticate() call.

  • getUnauthenticatedRedirectUrl() public

    Return the URL to redirect unauthenticated users to.

  • loadAuthenticator() public

    Loads an authenticator.

  • loadIdentifier() public

    Loads an identifier.

  • persistIdentity() public

    Persists the users data

Method Detail

authenticate() ¶ public

authenticate(Psr\Http\Message\ServerRequestInterface $request): Authentication\Authenticator\ResultInterface

Authenticate the request against the configured authentication adapters.

Parameters
Psr\Http\Message\ServerRequestInterface $request

The request.

Returns
Authentication\Authenticator\ResultInterface

clearIdentity() ¶ public

clearIdentity(Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response): array

Clears the identity data

Parameters
Psr\Http\Message\ServerRequestInterface $request

The request object.

Psr\Http\Message\ResponseInterface $response

The response object.

Returns
array

getAuthenticationProvider() ¶ public

getAuthenticationProvider(): Authentication\Authenticator\AuthenticatorInterface|null

Gets the successful authenticator instance if one was successful after calling authenticate

Returns
Authentication\Authenticator\AuthenticatorInterface|null

getIdentity() ¶ public

getIdentity(): Authentication\IdentityInterface|null

Gets an identity object or null if identity has not been resolved.

Returns
Authentication\IdentityInterface|null

getIdentityAttribute() ¶ public

getIdentityAttribute(): string

Return the name of the identity attribute.

Returns
string

getLoginRedirect() ¶ public

getLoginRedirect(Psr\Http\Message\ServerRequestInterface $request): string|null

Return the URL that an authenticated user came from or null.

Parameters
Psr\Http\Message\ServerRequestInterface $request

The request

Returns
string|null

getResult() ¶ public

getResult(): Authentication\Authenticator\ResultInterface|null

Gets the result of the last authenticate() call.

Returns
Authentication\Authenticator\ResultInterface|null

getUnauthenticatedRedirectUrl() ¶ public

getUnauthenticatedRedirectUrl(Psr\Http\Message\ServerRequestInterface $request): string|null

Return the URL to redirect unauthenticated users to.

Parameters
Psr\Http\Message\ServerRequestInterface $request

The request

Returns
string|null

loadAuthenticator() ¶ public

loadAuthenticator(string $name, array $config = []): Authentication\Authenticator\AuthenticatorInterface

Loads an authenticator.

Parameters
string $name

Name or class name.

array $config optional

Authenticator configuration.

Returns
Authentication\Authenticator\AuthenticatorInterface

loadIdentifier() ¶ public

loadIdentifier(string $name, array $config = []): Authentication\Identifier\IdentifierInterface

Loads an identifier.

Parameters
string $name

Name or class name.

array $config optional

Identifier configuration.

Returns
Authentication\Identifier\IdentifierInterface

persistIdentity() ¶ public

persistIdentity(Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, ArrayAccess|array $identity): array

Persists the users data

Parameters
Psr\Http\Message\ServerRequestInterface $request

The request object.

Psr\Http\Message\ResponseInterface $response

The response object.

ArrayAccess|array $identity

Identity data to persist.

Returns
array
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