class Handler (View source)

The authentication Handler is responsible for handling authentication requirements and providing a Member to the Manager if required, so it can be used in request contexts.

Traits

Provides extensions to this object to integrate it with standard config API methods.

Methods

public static 
config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

public
mixed
stat(string $name) deprecated

Get inherited config value

public
mixed
uninherited(string $name)

Gets the uninherited value for the given config option

public
$this
set_stat(string $name, mixed $value) deprecated

Update the config value for a given property

public
Member|false
requireAuthentication(HTTPRequest $request)

If required, enforce authentication for non-session authenticated requests. The Member returned from the authentication method will returned for use in the OperationResolver context.

public
AuthenticatorInterface|null
getAuthenticator(HTTPRequest $request)

Returns the first configured authenticator by highest priority, or null if none are configured

protected
buildAuthenticator(string $authenticator)

No description

public
void
prioritiseAuthenticators(array $authenticators)

Sort the configured authenticators by their "priority" (highest to lowest). This allows modules to contribute to the decision of which authenticator should be used first. Users can rewrite this in their own configuration if necessary.

Details

static Config_ForClass config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

Return Value

Config_ForClass

mixed stat(string $name) deprecated

deprecated 5.0 Use ->config()->get() instead

Get inherited config value

Parameters

string $name

Return Value

mixed

mixed uninherited(string $name)

Gets the uninherited value for the given config option

Parameters

string $name

Return Value

mixed

$this set_stat(string $name, mixed $value) deprecated

deprecated 5.0 Use ->config()->set() instead

Update the config value for a given property

Parameters

string $name
mixed $value

Return Value

$this

Member|false requireAuthentication(HTTPRequest $request)

If required, enforce authentication for non-session authenticated requests. The Member returned from the authentication method will returned for use in the OperationResolver context.

Authenticators are defined in configuration. AuthenticatorInterface::authenticate.

Parameters

HTTPRequest $request

Return Value

Member|false

If authentication was successful the Member is returned. False if no authenticators are configured.

Exceptions

ValidationException

AuthenticatorInterface|null getAuthenticator(HTTPRequest $request)

Returns the first configured authenticator by highest priority, or null if none are configured

Parameters

HTTPRequest $request

Return Value

AuthenticatorInterface|null

protected AuthenticatorInterface buildAuthenticator(string $authenticator)

No description

Parameters

string $authenticator

Return Value

AuthenticatorInterface

Exceptions

ValidationException

void prioritiseAuthenticators(array $authenticators)

Sort the configured authenticators by their "priority" (highest to lowest). This allows modules to contribute to the decision of which authenticator should be used first. Users can rewrite this in their own configuration if necessary.

Parameters

array $authenticators

Return Value

void