Authenticator
class Authenticator implements Authenticator (View source)
Class RealMeAuthenticator
Traits
A class that can be instantiated or replaced via DI
Properties
protected | RealMeService | $service |
Methods
An implementation of the factory method, allows you to create an instance of a class
Creates a class instance by the "singleton" design pattern.
Ensures that enough detail has been configured to allow this authenticator to function properly. Specifically, this checks the following:
- Check certs are in place
- RealMeSetupTask has been created
Return RequestHandler to manage the log-in process.
Return the RequestHandler to manage the log-out process.
Return RequestHandler to manage the change-password process.
Method to authenticate an user.
Check if the passed password matches the stored one (if the member is not locked out).
Details
static Injectable
create(mixed ...$args)
An implementation of the factory method, allows you to create an instance of a class
This method will defer class substitution to the Injector API, which can be customised via the Config API to declare substitution classes.
This can be called in one of two ways - either calling via the class directly, or calling on Object and passing the class name as the first parameter. The following are equivalent: $list = DataList::create(SiteTree::class); $list = SiteTree::get();
static Injectable
singleton(string $class = null)
Creates a class instance by the "singleton" design pattern.
It will always return the same instance for this class, which can be used for performance reasons and as a simple way to access instance methods which don't rely on instance data (e.g. the custom SilverStripe static handling).
bool
__construct()
Ensures that enough detail has been configured to allow this authenticator to function properly. Specifically, this checks the following:
- Check certs are in place
- RealMeSetupTask has been created
int
supportedServices()
Returns the services supported by this authenticator
The number should be a bitwise-OR of 1 or more of the following constants: Authenticator::LOGIN, Authenticator::LOGOUT, Authenticator::CHANGE_PASSWORD, Authenticator::RESET_PASSWORD, or Authenticator::CMS_LOGIN
LoginHandler
getLoginHandler(string $link)
Return RequestHandler to manage the log-in process.
The default URL of the RequestHandler should return the initial log-in form, any other URL may be added for other steps & processing.
URL-handling methods may return an array [ "Form" => (form-object) ] which can then be merged into a default controller.
LogoutHandler
getLogOutHandler(string $link)
Return the RequestHandler to manage the log-out process.
The default URL of the RequestHandler should log the user out immediately and destroy the session.
getChangePasswordHandler(string $link)
Return RequestHandler to manage the change-password process.
The default URL of the RequetHandler should return the initial change-password form, any other URL may be added for other steps & processing.
URL-handling methods may return an array [ "Form" => (form-object) ] which can then be merged into a default controller.
mixed
getLostPasswordHandler(string $link)
No description
Member
authenticate(array $data, HTTPRequest $request, ValidationResult $result = null)
Method to authenticate an user.
ValidationResult
checkPassword(Member $member, string $password, ValidationResult $result = null)
Check if the passed password matches the stored one (if the member is not locked out).
Note, we don't return early, to prevent differences in timings to give away if a member password is invalid.
Passwords are not part of this authenticator
RealMeService
getService()
No description
$this
setService(RealMeService $service)
No description